#pragma once

#include <windows.h>

#include "js32.h"

// Information taken from
// http://phrozenkeep.planetdiablo.gamespy.com/forum/viewtopic.php?t=48175

static DWORD d2CommonOff = (DWORD)GetModuleHandle(NULL); //"D2Common.DLL") ? (DWORD) GetModuleHandle("D2Common.DLL") : (DWORD) LoadLibrary("D2Common.DLL") ;
enum {
    FIELDTYPE_END = 0,
    FIELDTYPE_DATA_ASCII = 1,
    FIELDTYPE_DATA_DWORD = 2,
    FIELDTYPE_DATA_WORD = 3,
    FIELDTYPE_DATA_BYTE = 4,
    FIELDTYPE_UNKNOWN_5 = 5,
    FIELDTYPE_DATA_BYTE_2 = 6,
    FIELDTYPE_DATA_DWORD_2 = 8,
    FIELDTYPE_DATA_RAW = 9,
    FIELDTYPE_ASCII_TO_CODE = 10,
    FIELDTYPE_UNKNOWN_11 = 11,
    FIELDTYPE_UNKNOWN_12 = 12,
    FIELDTYPE_CODE_TO_BYTE = 13,
    FIELDTYPE_UNKNOWN_14 = 14,
    FIELDTYPE_CODE_TO_WORD = 15,
    FIELDTYPE_UNKNOWN_16 = 16,
    FIELDTYPE_NAME_TO_INDEX = 17,
    FIELDTYPE_NAME_TO_INDEX_2 = 18,
    FIELDTYPE_NAME_TO_DWORD = 19,
    FIELDTYPE_NAME_TO_WORD = 20,
    FIELDTYPE_NAME_TO_WORD_2 = 21,
    FIELDTYPE_KEY_TO_WORD = 22,
    FIELDTYPE_MONSTER_COMPS = 23,
    FIELDTYPE_UNKNOWN_24 = 24,
    FIELDTYPE_CALC_TO_DWORD = 25,
    FIELDTYPE_DATA_BIT = 26,
};

struct BinField {
    char szFieldName[64];
    DWORD eFieldType;
    DWORD dwFieldLength;
    DWORD dwFieldOffset;
};

struct MPQTable {
    DWORD dwEntry;            // if > 0xFFFF it is not located in the exported mpq data..
    DWORD dwMaxEntriesOffset; // ""
    BinField* pTable;
    char szTableName[15];
    WORD wTableSize;
    WORD wUnknown;
};

DWORD GetBaseTable(int nBaseStat, int nClassId);
bool FillBaseStat(char* szTable, int row, char* szStat, void* result, size_t size);
bool FillBaseStat(char* szTable, int row, int column, void* result, size_t size);
bool FillBaseStat(int table, int row, char* szStat, void* result, size_t size);
bool FillBaseStat(int table, int row, int column, void* result, size_t size);
DWORD FillBaseStat(JSContext* cx, jsval* argv, int table, int row, int column, char* szTable, char* szStat);

// Tables dumped by Sheppard

static BinField itemTable[] = {
    {"flippyfile", FIELDTYPE_DATA_ASCII, 0x1f, 0x0},
    {"invfile", FIELDTYPE_DATA_ASCII, 0x1f, 0x20},
    {"uniqueinvfile", FIELDTYPE_DATA_ASCII, 0x1f, 0x40},
    {"setinvfile", FIELDTYPE_DATA_ASCII, 0x1f, 0x60},
    {"code", FIELDTYPE_ASCII_TO_CODE, 0x0, 0x80},
    {"normcode", FIELDTYPE_DATA_RAW, 0x0, 0x84},
    {"ubercode", FIELDTYPE_DATA_RAW, 0x0, 0x88},
    {"ultracode", FIELDTYPE_DATA_RAW, 0x0, 0x8c},
    {"alternategfx", FIELDTYPE_DATA_RAW, 0x0, 0x90},
    {"pSpell", FIELDTYPE_DATA_DWORD, 0x0, 0x94},
    {"state", FIELDTYPE_NAME_TO_WORD, 0x0, 0x98},
    {"cstate1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9a},
    {"cstate2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9c},
    {"stat1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9e},
    {"stat2", FIELDTYPE_NAME_TO_WORD, 0x0, 0xa0},
    {"stat3", FIELDTYPE_NAME_TO_WORD, 0x0, 0xa2},
    {"calc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa4},
    {"calc2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa8},
    {"calc3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xac},
    {"len", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb0},
    {"spelldesc", FIELDTYPE_DATA_BYTE, 0x0, 0xb4},
    {"spelldescstr", FIELDTYPE_KEY_TO_WORD, 0x0, 0xb6},
    {"spelldesccalc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb8},
    {"BetterGem", FIELDTYPE_DATA_RAW, 0x0, 0xbc},
    {"wclass", FIELDTYPE_DATA_RAW, 0x0, 0xc0},
    {"2handedwclass", FIELDTYPE_DATA_RAW, 0x0, 0xc4},
    {"TMogType", FIELDTYPE_DATA_RAW, 0x0, 0xc8},
    {"minac", FIELDTYPE_DATA_DWORD, 0x0, 0xcc},
    {"maxac", FIELDTYPE_DATA_DWORD, 0x0, 0xd0},
    {"gamble cost", FIELDTYPE_DATA_DWORD, 0x0, 0xd4},
    {"speed", FIELDTYPE_DATA_DWORD_2, 0x0, 0xd8},
    {"bitfield1", FIELDTYPE_DATA_DWORD, 0x0, 0xdc},
    {"cost", FIELDTYPE_DATA_DWORD, 0x0, 0xe0},
    {"minstack", FIELDTYPE_DATA_DWORD, 0x0, 0xe4},
    {"maxstack", FIELDTYPE_DATA_DWORD, 0x0, 0xe8},
    {"spawnstack", FIELDTYPE_DATA_DWORD, 0x0, 0xec},
    {"gemoffset", FIELDTYPE_DATA_DWORD_2, 0x0, 0xf0},
    {"namestr", FIELDTYPE_KEY_TO_WORD, 0x0, 0xf4},
    {"version", FIELDTYPE_DATA_WORD, 0x0, 0xf6},
    {"auto prefix", FIELDTYPE_DATA_WORD, 0x0, 0xf8},
    {"missiletype", FIELDTYPE_DATA_WORD, 0x0, 0xfa},
    {"rarity", FIELDTYPE_DATA_BYTE, 0x0, 0xfc},
    {"level", FIELDTYPE_DATA_BYTE, 0x0, 0xfd},
    {"mindam", FIELDTYPE_DATA_BYTE_2, 0x0, 0xfe},
    {"maxdam", FIELDTYPE_DATA_BYTE_2, 0x0, 0xff},
    {"minmisdam", FIELDTYPE_DATA_BYTE, 0x0, 0x100},
    {"maxmisdam", FIELDTYPE_DATA_BYTE, 0x0, 0x101},
    {"2handmindam", FIELDTYPE_DATA_BYTE_2, 0x0, 0x102},
    {"2handmaxdam", FIELDTYPE_DATA_BYTE_2, 0x0, 0x103},
    {"rangeadder", FIELDTYPE_DATA_BYTE_2, 0x0, 0x104},
    {"strbonus", FIELDTYPE_DATA_WORD, 0x0, 0x106},
    {"dexbonus", FIELDTYPE_DATA_WORD, 0x0, 0x108},
    {"reqstr", FIELDTYPE_DATA_WORD, 0x0, 0x10a},
    {"reqdex", FIELDTYPE_DATA_WORD, 0x0, 0x10c},
    {"absorbs", FIELDTYPE_DATA_BYTE_2, 0x0, 0x10e},
    {"invwidth", FIELDTYPE_DATA_BYTE, 0x0, 0x10f},
    {"invheight", FIELDTYPE_DATA_BYTE, 0x0, 0x110},
    {"block", FIELDTYPE_DATA_BYTE_2, 0x0, 0x111},
    {"durability", FIELDTYPE_DATA_BYTE_2, 0x0, 0x112},
    {"nodurability", FIELDTYPE_DATA_BYTE, 0x0, 0x113},
    {"missile", FIELDTYPE_DATA_BYTE_2, 0x0, 0x114},
    {"component", FIELDTYPE_DATA_BYTE, 0x0, 0x115},
    {"rArm", FIELDTYPE_DATA_BYTE_2, 0x0, 0x116},
    {"lArm", FIELDTYPE_DATA_BYTE_2, 0x0, 0x117},
    {"torso", FIELDTYPE_DATA_BYTE_2, 0x0, 0x118},
    {"legs", FIELDTYPE_DATA_BYTE_2, 0x0, 0x119},
    {"rspad", FIELDTYPE_DATA_BYTE_2, 0x0, 0x11a},
    {"lspad", FIELDTYPE_DATA_BYTE_2, 0x0, 0x11b},
    {"2handed", FIELDTYPE_DATA_BYTE_2, 0x0, 0x11c},
    {"useable", FIELDTYPE_DATA_BYTE, 0x0, 0x11d},
    {"type", FIELDTYPE_CODE_TO_WORD, 0x0, 0x11e},
    {"type2", FIELDTYPE_CODE_TO_WORD, 0x0, 0x120},
    {"subtype", FIELDTYPE_DATA_BYTE_2, 0x0, 0x122},
    {"dropsound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x124},
    {"usesound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x126},
    {"dropsfxframe", FIELDTYPE_DATA_BYTE, 0x0, 0x128},
    {"unique", FIELDTYPE_DATA_BYTE, 0x0, 0x129},
    {"quest", FIELDTYPE_DATA_BYTE, 0x0, 0x12a},
    {"questdiffcheck", FIELDTYPE_DATA_BYTE, 0x0, 0x12b},
    {"transparent", FIELDTYPE_DATA_BYTE, 0x0, 0x12c},
    {"transtbl", FIELDTYPE_DATA_BYTE, 0x0, 0x12d},
    {"lightradius", FIELDTYPE_DATA_BYTE, 0x0, 0x12f},
    {"belt", FIELDTYPE_DATA_BYTE, 0x0, 0x130},
    {"autobelt", FIELDTYPE_DATA_BYTE, 0x0, 0x131},
    {"stackable", FIELDTYPE_DATA_BYTE, 0x0, 0x132},
    {"spawnable", FIELDTYPE_DATA_BYTE, 0x0, 0x133},
    {"spellicon", FIELDTYPE_DATA_BYTE_2, 0x0, 0x134},
    {"durwarning", FIELDTYPE_DATA_BYTE, 0x0, 0x135},
    {"qntwarning", FIELDTYPE_DATA_BYTE, 0x0, 0x136},
    {"hasinv", FIELDTYPE_DATA_BYTE_2, 0x0, 0x137},
    {"gemsockets", FIELDTYPE_DATA_BYTE_2, 0x0, 0x138},
    {"Transmogrify", FIELDTYPE_DATA_BYTE_2, 0x0, 0x139},
    {"TMogMin", FIELDTYPE_DATA_BYTE_2, 0x0, 0x13a},
    {"TMogMax", FIELDTYPE_DATA_BYTE_2, 0x0, 0x13b},
    {"hit class", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x13c},
    {"1or2handed", FIELDTYPE_DATA_BYTE_2, 0x0, 0x13d},
    {"gemapplytype", FIELDTYPE_DATA_BYTE, 0x0, 0x13e},
    {"levelreq", FIELDTYPE_DATA_BYTE, 0x0, 0x13f},
    {"magic lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x140},
    {"Transform", FIELDTYPE_DATA_BYTE, 0x0, 0x141},
    {"InvTrans", FIELDTYPE_DATA_BYTE, 0x0, 0x142},
    {"compactsave", FIELDTYPE_DATA_BYTE_2, 0x0, 0x143},
    {"SkipName", FIELDTYPE_DATA_BYTE, 0x0, 0x144},
    {"Nameable", FIELDTYPE_DATA_BYTE, 0x0, 0x145},
    {"AkaraMin", FIELDTYPE_DATA_BYTE, 0x0, 0x146},
    {"GheedMin", FIELDTYPE_DATA_BYTE, 0x0, 0x147},
    {"CharsiMin", FIELDTYPE_DATA_BYTE, 0x0, 0x148},
    {"FaraMin", FIELDTYPE_DATA_BYTE, 0x0, 0x149},
    {"LysanderMin", FIELDTYPE_DATA_BYTE, 0x0, 0x14a},
    {"DrognanMin", FIELDTYPE_DATA_BYTE, 0x0, 0x14b},
    {"HraltiMin", FIELDTYPE_DATA_BYTE, 0x0, 0x14c},
    {"AlkorMin", FIELDTYPE_DATA_BYTE, 0x0, 0x14d},
    {"OrmusMin", FIELDTYPE_DATA_BYTE, 0x0, 0x14e},
    {"ElzixMin", FIELDTYPE_DATA_BYTE, 0x0, 0x14f},
    {"AshearaMin", FIELDTYPE_DATA_BYTE, 0x0, 0x150},
    {"CainMin", FIELDTYPE_DATA_BYTE, 0x0, 0x151},
    {"HalbuMin", FIELDTYPE_DATA_BYTE, 0x0, 0x152},
    {"JamellaMin", FIELDTYPE_DATA_BYTE, 0x0, 0x153},
    {"MalahMin", FIELDTYPE_DATA_BYTE, 0x0, 0x154},
    {"LarzukMin", FIELDTYPE_DATA_BYTE, 0x0, 0x155},
    {"DrehyaMin", FIELDTYPE_DATA_BYTE, 0x0, 0x156},
    {"AkaraMax", FIELDTYPE_DATA_BYTE, 0x0, 0x157},
    {"GheedMax", FIELDTYPE_DATA_BYTE, 0x0, 0x158},
    {"CharsiMax", FIELDTYPE_DATA_BYTE, 0x0, 0x159},
    {"FaraMax", FIELDTYPE_DATA_BYTE, 0x0, 0x15a},
    {"LysanderMax", FIELDTYPE_DATA_BYTE, 0x0, 0x15b},
    {"DrognanMax", FIELDTYPE_DATA_BYTE, 0x0, 0x15c},
    {"HraltiMax", FIELDTYPE_DATA_BYTE, 0x0, 0x15d},
    {"AlkorMax", FIELDTYPE_DATA_BYTE, 0x0, 0x15e},
    {"OrmusMax", FIELDTYPE_DATA_BYTE, 0x0, 0x15f},
    {"ElzixMax", FIELDTYPE_DATA_BYTE, 0x0, 0x160},
    {"AshearaMax", FIELDTYPE_DATA_BYTE, 0x0, 0x161},
    {"CainMax", FIELDTYPE_DATA_BYTE, 0x0, 0x162},
    {"HalbuMax", FIELDTYPE_DATA_BYTE, 0x0, 0x163},
    {"JamellaMax", FIELDTYPE_DATA_BYTE, 0x0, 0x164},
    {"MalahMax", FIELDTYPE_DATA_BYTE, 0x0, 0x165},
    {"LarzukMax", FIELDTYPE_DATA_BYTE, 0x0, 0x166},
    {"DrehyaMax", FIELDTYPE_DATA_BYTE, 0x0, 0x167},
    {"AkaraMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x168},
    {"GheedMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x169},
    {"CharsiMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x16a},
    {"FaraMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x16b},
    {"LysanderMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x16c},
    {"DrognanMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x16d},
    {"HraltiMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x16e},
    {"AlkorMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x16f},
    {"OrmusMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x170},
    {"ElzixMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x171},
    {"AshearaMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x172},
    {"CainMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x173},
    {"HalbuMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x174},
    {"JamellaMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x175},
    {"MalahMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x176},
    {"LarzukMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x177},
    {"DrehyaMagicMin", FIELDTYPE_DATA_BYTE, 0x0, 0x178},
    {"AkaraMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x179},
    {"GheedMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x17a},
    {"CharsiMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x17b},
    {"FaraMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x17c},
    {"LysanderMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x17d},
    {"DrognanMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x17e},
    {"HraltiMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x17f},
    {"AlkorMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x180},
    {"OrmusMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x181},
    {"ElzixMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x182},
    {"AshearaMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x183},
    {"CainMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x184},
    {"HalbuMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x185},
    {"JamellaMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x186},
    {"MalahMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x187},
    {"LarzukMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x188},
    {"DrehyaMagicMax", FIELDTYPE_DATA_BYTE, 0x0, 0x189},
    {"AkaraMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x18a},
    {"GheedMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x18b},
    {"CharsiMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x18c},
    {"FaraMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x18d},
    {"LysanderMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x18e},
    {"DrognanMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x18f},
    {"HraltiMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x190},
    {"AlkorMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x191},
    {"OrmusMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x192},
    {"ElzixMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x193},
    {"AshearaMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x194},
    {"CainMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x195},
    {"HalbuMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x196},
    {"JamellaMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x197},
    {"MalahMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x198},
    {"LarzukMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x199},
    {"DrehyaMagicLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x19a},
    {"NightmareUpgrade", FIELDTYPE_DATA_RAW, 0x0, 0x19c},
    {"HellUpgrade", FIELDTYPE_DATA_RAW, 0x0, 0x1a0},
    {"PermStoreItem", FIELDTYPE_DATA_BYTE, 0x0, 0x1a4},
    {"multibuy", FIELDTYPE_DATA_BYTE, 0x0, 0x1a5},
    {"end", FIELDTYPE_END, 0x0, 0x1a8},
};
static BinField monstatsTable[] = {
    {"Id", FIELDTYPE_NAME_TO_INDEX, 0x0, 0x0},
    {"BaseId", FIELDTYPE_NAME_TO_WORD, 0x0, 0x2},
    {"NextInClass", FIELDTYPE_NAME_TO_WORD, 0x0, 0x4},
    {"NameStr", FIELDTYPE_KEY_TO_WORD, 0x0, 0x6},
    {"DescStr", FIELDTYPE_KEY_TO_WORD, 0x0, 0x8},
    {"isSpawn", FIELDTYPE_DATA_BIT, 0x0, 0xc},
    {"isMelee", FIELDTYPE_DATA_BIT, 0x1, 0xc},
    {"noRatio", FIELDTYPE_DATA_BIT, 0x2, 0xc},
    {"opendoors", FIELDTYPE_DATA_BIT, 0x3, 0xc},
    {"SetBoss", FIELDTYPE_DATA_BIT, 0x4, 0xc},
    {"BossXfer", FIELDTYPE_DATA_BIT, 0x5, 0xc},
    {"boss", FIELDTYPE_DATA_BIT, 0x6, 0xc},
    {"primeevil", FIELDTYPE_DATA_BIT, 0x7, 0xc},
    {"npc", FIELDTYPE_DATA_BIT, 0x8, 0xc},
    {"interact", FIELDTYPE_DATA_BIT, 0x9, 0xc},
    {"inTown", FIELDTYPE_DATA_BIT, 0xa, 0xc},
    {"lUndead", FIELDTYPE_DATA_BIT, 0xb, 0xc},
    {"hUndead", FIELDTYPE_DATA_BIT, 0xc, 0xc},
    {"demon", FIELDTYPE_DATA_BIT, 0xd, 0xc},
    {"flying", FIELDTYPE_DATA_BIT, 0xe, 0xc},
    {"killable", FIELDTYPE_DATA_BIT, 0xf, 0xc},
    {"switchai", FIELDTYPE_DATA_BIT, 0x10, 0xc},
    {"nomultishot", FIELDTYPE_DATA_BIT, 0x11, 0xc},
    {"neverCount", FIELDTYPE_DATA_BIT, 0x12, 0xc},
    {"petIgnore", FIELDTYPE_DATA_BIT, 0x13, 0xc},
    {"deathDmg", FIELDTYPE_DATA_BIT, 0x14, 0xc},
    {"genericSpawn", FIELDTYPE_DATA_BIT, 0x15, 0xc},
    {"zoo", FIELDTYPE_DATA_BIT, 0x16, 0xc},
    {"placespawn", FIELDTYPE_DATA_BIT, 0x17, 0xc},
    {"inventory", FIELDTYPE_DATA_BIT, 0x18, 0xc},
    {"enabled", FIELDTYPE_DATA_BIT, 0x19, 0xc},
    {"NoShldBlock", FIELDTYPE_DATA_BIT, 0x1a, 0xc},
    {"noaura", FIELDTYPE_DATA_BIT, 0x1b, 0xc},
    {"rangedtype", FIELDTYPE_DATA_BIT, 0x1c, 0xc},
    {"Code", FIELDTYPE_DATA_RAW, 0x0, 0x10},
    {"MonSound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x14},
    {"UMonSound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x16},
    {"MonStatsEx", FIELDTYPE_NAME_TO_WORD, 0x0, 0x18},
    {"MonProp", FIELDTYPE_NAME_TO_WORD, 0x0, 0x1a},
    {"MonType", FIELDTYPE_NAME_TO_WORD, 0x0, 0x1c},
    {"AI", FIELDTYPE_NAME_TO_WORD, 0x0, 0x1e},
    {"spawn", FIELDTYPE_NAME_TO_WORD, 0x0, 0x20},
    {"spawnx", FIELDTYPE_DATA_BYTE, 0x0, 0x22},
    {"spawny", FIELDTYPE_DATA_BYTE, 0x0, 0x23},
    {"spawnmode", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x24},
    {"minion1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x26},
    {"minion2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x28},
    {"PartyMin", FIELDTYPE_DATA_BYTE, 0x0, 0x2c},
    {"PartyMax", FIELDTYPE_DATA_BYTE, 0x0, 0x2d},
    {"Rarity", FIELDTYPE_DATA_BYTE, 0x0, 0x2e},
    {"MinGrp", FIELDTYPE_DATA_BYTE, 0x0, 0x2f},
    {"MaxGrp", FIELDTYPE_DATA_BYTE, 0x0, 0x30},
    {"sparsePopulate", FIELDTYPE_DATA_BYTE, 0x0, 0x31},
    {"Velocity", FIELDTYPE_DATA_WORD, 0x0, 0x32},
    {"Run", FIELDTYPE_DATA_WORD, 0x0, 0x34},
    {"MissA1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x3a},
    {"MissA2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x3c},
    {"MissS1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x3e},
    {"MissS2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x40},
    {"MissS3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x42},
    {"MissS4", FIELDTYPE_NAME_TO_WORD, 0x0, 0x44},
    {"MissC", FIELDTYPE_NAME_TO_WORD, 0x0, 0x46},
    {"MissSQ", FIELDTYPE_NAME_TO_WORD, 0x0, 0x48},
    {"Align", FIELDTYPE_DATA_BYTE, 0x0, 0x4c},
    {"TransLvl", FIELDTYPE_DATA_BYTE, 0x0, 0x4d},
    {"threat", FIELDTYPE_DATA_BYTE, 0x0, 0x4e},
    {"aidel", FIELDTYPE_DATA_BYTE, 0x0, 0x4f},
    {"aidel(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x50},
    {"aidel(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x51},
    {"aidist", FIELDTYPE_DATA_BYTE, 0x0, 0x52},
    {"aidist(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x53},
    {"aidist(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x54},
    {"aip1", FIELDTYPE_DATA_WORD, 0x0, 0x56},
    {"aip1(N)", FIELDTYPE_DATA_WORD, 0x0, 0x58},
    {"aip1(H)", FIELDTYPE_DATA_WORD, 0x0, 0x5a},
    {"aip2", FIELDTYPE_DATA_WORD, 0x0, 0x5c},
    {"aip2(N)", FIELDTYPE_DATA_WORD, 0x0, 0x5e},
    {"aip2(H)", FIELDTYPE_DATA_WORD, 0x0, 0x60},
    {"aip3", FIELDTYPE_DATA_WORD, 0x0, 0x62},
    {"aip3(N)", FIELDTYPE_DATA_WORD, 0x0, 0x64},
    {"aip3(H)", FIELDTYPE_DATA_WORD, 0x0, 0x66},
    {"aip4", FIELDTYPE_DATA_WORD, 0x0, 0x68},
    {"aip4(N)", FIELDTYPE_DATA_WORD, 0x0, 0x6a},
    {"aip4(H)", FIELDTYPE_DATA_WORD, 0x0, 0x6c},
    {"aip5", FIELDTYPE_DATA_WORD, 0x0, 0x6e},
    {"aip5(N)", FIELDTYPE_DATA_WORD, 0x0, 0x70},
    {"aip5(H)", FIELDTYPE_DATA_WORD, 0x0, 0x72},
    {"aip6", FIELDTYPE_DATA_WORD, 0x0, 0x74},
    {"aip6(N)", FIELDTYPE_DATA_WORD, 0x0, 0x76},
    {"aip6(H)", FIELDTYPE_DATA_WORD, 0x0, 0x78},
    {"aip7", FIELDTYPE_DATA_WORD, 0x0, 0x7a},
    {"aip7(N)", FIELDTYPE_DATA_WORD, 0x0, 0x7c},
    {"aip7(H)", FIELDTYPE_DATA_WORD, 0x0, 0x7e},
    {"aip8", FIELDTYPE_DATA_WORD, 0x0, 0x80},
    {"aip8(N)", FIELDTYPE_DATA_WORD, 0x0, 0x82},
    {"aip8(H)", FIELDTYPE_DATA_WORD, 0x0, 0x84},
    {"TreasureClass1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x86},
    {"TreasureClass2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x88},
    {"TreasureClass3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x8a},
    {"TreasureClass4", FIELDTYPE_NAME_TO_WORD, 0x0, 0x8c},
    {"TreasureClass1(N)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x8e},
    {"TreasureClass2(N)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x90},
    {"TreasureClass3(N)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x92},
    {"TreasureClass4(N)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x94},
    {"TreasureClass1(H)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x96},
    {"TreasureClass2(H)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x98},
    {"TreasureClass3(H)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9a},
    {"TreasureClass4(H)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9c},
    {"TCQuestId", FIELDTYPE_DATA_BYTE, 0x0, 0x9e},
    {"TCQuestCP", FIELDTYPE_DATA_BYTE, 0x0, 0x9f},
    {"Drain", FIELDTYPE_DATA_BYTE, 0x0, 0xa0},
    {"Drain(N)", FIELDTYPE_DATA_BYTE, 0x0, 0xa1},
    {"Drain(H)", FIELDTYPE_DATA_BYTE, 0x0, 0xa2},
    {"ToBlock", FIELDTYPE_DATA_BYTE, 0x0, 0xa3},
    {"ToBlock(N)", FIELDTYPE_DATA_BYTE, 0x0, 0xa4},
    {"ToBlock(H)", FIELDTYPE_DATA_BYTE, 0x0, 0xa5},
    {"Crit", FIELDTYPE_DATA_BYTE, 0x0, 0xa6},
    {"SkillDamage", FIELDTYPE_NAME_TO_WORD, 0x0, 0xa8},
    {"Level", FIELDTYPE_DATA_WORD, 0x0, 0xaa},
    {"Level(N)", FIELDTYPE_DATA_WORD, 0x0, 0xac},
    {"Level(H)", FIELDTYPE_DATA_WORD, 0x0, 0xae},
    {"MinHP", FIELDTYPE_DATA_WORD, 0x0, 0xb0},
    {"MinHP(N)", FIELDTYPE_DATA_WORD, 0x0, 0xb2},
    {"MinHP(H)", FIELDTYPE_DATA_WORD, 0x0, 0xb4},
    {"MaxHP", FIELDTYPE_DATA_WORD, 0x0, 0xb6},
    {"MaxHP(N)", FIELDTYPE_DATA_WORD, 0x0, 0xb8},
    {"MaxHP(H)", FIELDTYPE_DATA_WORD, 0x0, 0xba},
    {"AC", FIELDTYPE_DATA_WORD, 0x0, 0xbc},
    {"AC(N)", FIELDTYPE_DATA_WORD, 0x0, 0xbe},
    {"AC(H)", FIELDTYPE_DATA_WORD, 0x0, 0xc0},
    {"A1TH", FIELDTYPE_DATA_WORD, 0x0, 0xc2},
    {"A1TH(N)", FIELDTYPE_DATA_WORD, 0x0, 0xc4},
    {"A1TH(H)", FIELDTYPE_DATA_WORD, 0x0, 0xc6},
    {"A2TH", FIELDTYPE_DATA_WORD, 0x0, 0xc8},
    {"A2TH(N)", FIELDTYPE_DATA_WORD, 0x0, 0xca},
    {"A2TH(H)", FIELDTYPE_DATA_WORD, 0x0, 0xcc},
    {"S1TH", FIELDTYPE_DATA_WORD, 0x0, 0xce},
    {"S1TH(N)", FIELDTYPE_DATA_WORD, 0x0, 0xd0},
    {"S1TH(H)", FIELDTYPE_DATA_WORD, 0x0, 0xd2},
    {"Exp", FIELDTYPE_DATA_WORD, 0x0, 0xd4},
    {"Exp(N)", FIELDTYPE_DATA_WORD, 0x0, 0xd6},
    {"Exp(H)", FIELDTYPE_DATA_WORD, 0x0, 0xd8},
    {"A1MinD", FIELDTYPE_DATA_WORD, 0x0, 0xda},
    {"A1MinD(N)", FIELDTYPE_DATA_WORD, 0x0, 0xdc},
    {"A1MinD(H)", FIELDTYPE_DATA_WORD, 0x0, 0xde},
    {"A1MaxD", FIELDTYPE_DATA_WORD, 0x0, 0xe0},
    {"A1MaxD(N)", FIELDTYPE_DATA_WORD, 0x0, 0xe2},
    {"A1MaxD(H)", FIELDTYPE_DATA_WORD, 0x0, 0xe4},
    {"A2MinD", FIELDTYPE_DATA_WORD, 0x0, 0xe6},
    {"A2MinD(N)", FIELDTYPE_DATA_WORD, 0x0, 0xe8},
    {"A2MinD(H)", FIELDTYPE_DATA_WORD, 0x0, 0xea},
    {"A2MaxD", FIELDTYPE_DATA_WORD, 0x0, 0xec},
    {"A2MaxD(N)", FIELDTYPE_DATA_WORD, 0x0, 0xee},
    {"A2MaxD(H)", FIELDTYPE_DATA_WORD, 0x0, 0xf0},
    {"S1MinD", FIELDTYPE_DATA_WORD, 0x0, 0xf2},
    {"S1MinD(N)", FIELDTYPE_DATA_WORD, 0x0, 0xf4},
    {"S1MinD(H)", FIELDTYPE_DATA_WORD, 0x0, 0xf6},
    {"S1MaxD", FIELDTYPE_DATA_WORD, 0x0, 0xf8},
    {"S1MaxD(N)", FIELDTYPE_DATA_WORD, 0x0, 0xfa},
    {"S1MaxD(H)", FIELDTYPE_DATA_WORD, 0x0, 0xfc},
    {"El1Mode", FIELDTYPE_CODE_TO_BYTE, 0x0, 0xfe},
    {"El2Mode", FIELDTYPE_CODE_TO_BYTE, 0x0, 0xff},
    {"El3Mode", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x100},
    {"El1Type", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x101},
    {"El2Type", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x102},
    {"El3Type", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x103},
    {"El1Pct", FIELDTYPE_DATA_BYTE, 0x0, 0x104},
    {"El1Pct(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x105},
    {"El1Pct(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x106},
    {"El2Pct", FIELDTYPE_DATA_BYTE, 0x0, 0x107},
    {"El2Pct(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x108},
    {"El2Pct(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x109},
    {"El3Pct", FIELDTYPE_DATA_BYTE, 0x0, 0x10a},
    {"El3Pct(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x10b},
    {"El3Pct(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x10c},
    {"El1MinD", FIELDTYPE_DATA_WORD, 0x0, 0x10e},
    {"El1MinD(N)", FIELDTYPE_DATA_WORD, 0x0, 0x110},
    {"El1MinD(H)", FIELDTYPE_DATA_WORD, 0x0, 0x112},
    {"El2MinD", FIELDTYPE_DATA_WORD, 0x0, 0x114},
    {"El2MinD(N)", FIELDTYPE_DATA_WORD, 0x0, 0x116},
    {"El2MinD(H)", FIELDTYPE_DATA_WORD, 0x0, 0x118},
    {"El3MinD", FIELDTYPE_DATA_WORD, 0x0, 0x11a},
    {"El3MinD(N)", FIELDTYPE_DATA_WORD, 0x0, 0x11c},
    {"El3MinD(H)", FIELDTYPE_DATA_WORD, 0x0, 0x11e},
    {"El1MaxD", FIELDTYPE_DATA_WORD, 0x0, 0x120},
    {"El1MaxD(N)", FIELDTYPE_DATA_WORD, 0x0, 0x122},
    {"El1MaxD(H)", FIELDTYPE_DATA_WORD, 0x0, 0x124},
    {"El2MaxD", FIELDTYPE_DATA_WORD, 0x0, 0x126},
    {"El2MaxD(N)", FIELDTYPE_DATA_WORD, 0x0, 0x128},
    {"El2MaxD(H)", FIELDTYPE_DATA_WORD, 0x0, 0x12a},
    {"El3MaxD", FIELDTYPE_DATA_WORD, 0x0, 0x12c},
    {"El3MaxD(N)", FIELDTYPE_DATA_WORD, 0x0, 0x12e},
    {"El3MaxD(H)", FIELDTYPE_DATA_WORD, 0x0, 0x130},
    {"El1Dur", FIELDTYPE_DATA_WORD, 0x0, 0x132},
    {"El1Dur(N)", FIELDTYPE_DATA_WORD, 0x0, 0x134},
    {"El1Dur(H)", FIELDTYPE_DATA_WORD, 0x0, 0x136},
    {"El2Dur", FIELDTYPE_DATA_WORD, 0x0, 0x138},
    {"El2Dur(N)", FIELDTYPE_DATA_WORD, 0x0, 0x13a},
    {"El2Dur(H)", FIELDTYPE_DATA_WORD, 0x0, 0x13c},
    {"El3Dur", FIELDTYPE_DATA_WORD, 0x0, 0x13e},
    {"El3Dur(N)", FIELDTYPE_DATA_WORD, 0x0, 0x140},
    {"El3Dur(H)", FIELDTYPE_DATA_WORD, 0x0, 0x142},
    {"ResDm", FIELDTYPE_DATA_WORD, 0x0, 0x144},
    {"ResDm(N)", FIELDTYPE_DATA_WORD, 0x0, 0x146},
    {"ResDm(H)", FIELDTYPE_DATA_WORD, 0x0, 0x148},
    {"ResMa", FIELDTYPE_DATA_WORD, 0x0, 0x14a},
    {"ResMa(N)", FIELDTYPE_DATA_WORD, 0x0, 0x14c},
    {"ResMa(H)", FIELDTYPE_DATA_WORD, 0x0, 0x14e},
    {"ResFi", FIELDTYPE_DATA_WORD, 0x0, 0x150},
    {"ResFi(N)", FIELDTYPE_DATA_WORD, 0x0, 0x152},
    {"ResFi(H)", FIELDTYPE_DATA_WORD, 0x0, 0x154},
    {"ResLi", FIELDTYPE_DATA_WORD, 0x0, 0x156},
    {"ResLi(N)", FIELDTYPE_DATA_WORD, 0x0, 0x158},
    {"ResLi(H)", FIELDTYPE_DATA_WORD, 0x0, 0x15a},
    {"ResCo", FIELDTYPE_DATA_WORD, 0x0, 0x15c},
    {"ResCo(N)", FIELDTYPE_DATA_WORD, 0x0, 0x15e},
    {"ResCo(H)", FIELDTYPE_DATA_WORD, 0x0, 0x160},
    {"ResPo", FIELDTYPE_DATA_WORD, 0x0, 0x162},
    {"ResPo(N)", FIELDTYPE_DATA_WORD, 0x0, 0x164},
    {"ResPo(H)", FIELDTYPE_DATA_WORD, 0x0, 0x166},
    {"ColdEffect", FIELDTYPE_DATA_BYTE, 0x0, 0x168},
    {"ColdEffect(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x169},
    {"ColdEffect(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x16a},
    {"SendSkills", FIELDTYPE_DATA_DWORD_2, 0x0, 0x16c},
    {"Skill1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x170},
    {"Skill2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x172},
    {"Skill3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x174},
    {"Skill4", FIELDTYPE_NAME_TO_WORD, 0x0, 0x176},
    {"Skill5", FIELDTYPE_NAME_TO_WORD, 0x0, 0x178},
    {"Skill6", FIELDTYPE_NAME_TO_WORD, 0x0, 0x17a},
    {"Skill7", FIELDTYPE_NAME_TO_WORD, 0x0, 0x17c},
    {"Skill8", FIELDTYPE_NAME_TO_WORD, 0x0, 0x17e},
    {"Sk1lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x198},
    {"Sk2lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x199},
    {"Sk3lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x19a},
    {"Sk4lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x19b},
    {"Sk5lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x19c},
    {"Sk6lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x19d},
    {"Sk7lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x19e},
    {"Sk8lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x19f},
    {"DamageRegen", FIELDTYPE_DATA_DWORD, 0x0, 0x1a0},
    {"SplEndDeath", FIELDTYPE_DATA_BYTE, 0x0, 0x1a4},
    {"SplGetModeChart", FIELDTYPE_DATA_BYTE, 0x0, 0x1a5},
    {"SplEndGeneric", FIELDTYPE_DATA_BYTE, 0x0, 0x1a6},
    {"SplClientEnd", FIELDTYPE_DATA_BYTE, 0x0, 0x1a7},
    {"end", FIELDTYPE_END, 0x0, 0x1a8},
};
static BinField skilldescTable[] = {
    {"skilldesc", FIELDTYPE_NAME_TO_INDEX, 0x0, 0x0},    {"skillpage", FIELDTYPE_DATA_BYTE, 0x0, 0x2},        {"skillrow", FIELDTYPE_DATA_BYTE, 0x0, 0x3},
    {"skillcolumn", FIELDTYPE_DATA_BYTE, 0x0, 0x4},      {"ListRow", FIELDTYPE_DATA_BYTE, 0x0, 0x5},          {"ListPool", FIELDTYPE_DATA_BYTE, 0x0, 0x6},
    {"iconcel", FIELDTYPE_DATA_BYTE, 0x0, 0x7},          {"str name", FIELDTYPE_KEY_TO_WORD, 0x0, 0x8},       {"str short", FIELDTYPE_KEY_TO_WORD, 0x0, 0xa},
    {"str long", FIELDTYPE_KEY_TO_WORD, 0x0, 0xc},       {"str alt", FIELDTYPE_KEY_TO_WORD, 0x0, 0xe},        {"str mana", FIELDTYPE_KEY_TO_WORD, 0x0, 0x10},
    {"descdam", FIELDTYPE_DATA_WORD, 0x0, 0x12},         {"descatt", FIELDTYPE_DATA_WORD, 0x0, 0x14},         {"ddam calc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x18},
    {"ddam calc2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x1c},  {"p1dmelem", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x20},     {"p2dmelem", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x21},
    {"p3dmelem", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x22},     {"p1dmmin", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x24},     {"p2dmmin", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x28},
    {"p3dmmin", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x2c},     {"p1dmmax", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x30},     {"p2dmmax", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x34},
    {"p3dmmax", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x38},     {"descmissile1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x3c}, {"descmissile2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x3e},
    {"descmissile3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x40}, {"descline1", FIELDTYPE_DATA_BYTE, 0x0, 0x42},       {"descline2", FIELDTYPE_DATA_BYTE, 0x0, 0x43},
    {"descline3", FIELDTYPE_DATA_BYTE, 0x0, 0x44},       {"descline4", FIELDTYPE_DATA_BYTE, 0x0, 0x45},       {"descline5", FIELDTYPE_DATA_BYTE, 0x0, 0x46},
    {"descline6", FIELDTYPE_DATA_BYTE, 0x0, 0x47},       {"dsc2line1", FIELDTYPE_DATA_BYTE, 0x0, 0x48},       {"dsc2line2", FIELDTYPE_DATA_BYTE, 0x0, 0x49},
    {"dsc2line3", FIELDTYPE_DATA_BYTE, 0x0, 0x4a},       {"dsc2line4", FIELDTYPE_DATA_BYTE, 0x0, 0x4b},       {"dsc3line1", FIELDTYPE_DATA_BYTE, 0x0, 0x4c},
    {"dsc3line2", FIELDTYPE_DATA_BYTE, 0x0, 0x4d},       {"dsc3line3", FIELDTYPE_DATA_BYTE, 0x0, 0x4e},       {"dsc3line4", FIELDTYPE_DATA_BYTE, 0x0, 0x4f},
    {"dsc3line5", FIELDTYPE_DATA_BYTE, 0x0, 0x50},       {"dsc3line6", FIELDTYPE_DATA_BYTE, 0x0, 0x51},       {"dsc3line7", FIELDTYPE_DATA_BYTE, 0x0, 0x52},
    {"desctexta1", FIELDTYPE_KEY_TO_WORD, 0x0, 0x54},    {"desctexta2", FIELDTYPE_KEY_TO_WORD, 0x0, 0x56},    {"desctexta3", FIELDTYPE_KEY_TO_WORD, 0x0, 0x58},
    {"desctexta4", FIELDTYPE_KEY_TO_WORD, 0x0, 0x5a},    {"desctexta5", FIELDTYPE_KEY_TO_WORD, 0x0, 0x5c},    {"desctexta6", FIELDTYPE_KEY_TO_WORD, 0x0, 0x5e},
    {"dsc2texta1", FIELDTYPE_KEY_TO_WORD, 0x0, 0x60},    {"dsc2texta2", FIELDTYPE_KEY_TO_WORD, 0x0, 0x62},    {"dsc2texta3", FIELDTYPE_KEY_TO_WORD, 0x0, 0x64},
    {"dsc2texta4", FIELDTYPE_KEY_TO_WORD, 0x0, 0x66},    {"dsc3texta1", FIELDTYPE_KEY_TO_WORD, 0x0, 0x68},    {"dsc3texta2", FIELDTYPE_KEY_TO_WORD, 0x0, 0x6a},
    {"dsc3texta3", FIELDTYPE_KEY_TO_WORD, 0x0, 0x6c},    {"dsc3texta4", FIELDTYPE_KEY_TO_WORD, 0x0, 0x6e},    {"dsc3texta5", FIELDTYPE_KEY_TO_WORD, 0x0, 0x70},
    {"dsc3texta6", FIELDTYPE_KEY_TO_WORD, 0x0, 0x72},    {"dsc3texta7", FIELDTYPE_KEY_TO_WORD, 0x0, 0x74},    {"desctextb1", FIELDTYPE_KEY_TO_WORD, 0x0, 0x76},
    {"desctextb2", FIELDTYPE_KEY_TO_WORD, 0x0, 0x78},    {"desctextb3", FIELDTYPE_KEY_TO_WORD, 0x0, 0x7a},    {"desctextb4", FIELDTYPE_KEY_TO_WORD, 0x0, 0x7c},
    {"desctextb5", FIELDTYPE_KEY_TO_WORD, 0x0, 0x7e},    {"desctextb6", FIELDTYPE_KEY_TO_WORD, 0x0, 0x80},    {"dsc2textb1", FIELDTYPE_KEY_TO_WORD, 0x0, 0x82},
    {"dsc2textb2", FIELDTYPE_KEY_TO_WORD, 0x0, 0x84},    {"dsc2textb3", FIELDTYPE_KEY_TO_WORD, 0x0, 0x86},    {"dsc2textb4", FIELDTYPE_KEY_TO_WORD, 0x0, 0x88},
    {"dsc3textb1", FIELDTYPE_KEY_TO_WORD, 0x0, 0x8a},    {"dsc3textb2", FIELDTYPE_KEY_TO_WORD, 0x0, 0x8c},    {"dsc3textb3", FIELDTYPE_KEY_TO_WORD, 0x0, 0x8e},
    {"dsc3textb4", FIELDTYPE_KEY_TO_WORD, 0x0, 0x90},    {"dsc3textb5", FIELDTYPE_KEY_TO_WORD, 0x0, 0x92},    {"dsc3textb6", FIELDTYPE_KEY_TO_WORD, 0x0, 0x94},
    {"dsc3textb7", FIELDTYPE_KEY_TO_WORD, 0x0, 0x96},    {"desccalca1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x98},  {"desccalca2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x9c},
    {"desccalca3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa0},  {"desccalca4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa4},  {"desccalca5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa8},
    {"desccalca6", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xac},  {"dsc2calca1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb0},  {"dsc2calca2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb4},
    {"dsc2calca3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb8},  {"dsc2calca4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xbc},  {"dsc3calca1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xc0},
    {"dsc3calca2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xc4},  {"dsc3calca3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xc8},  {"dsc3calca4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xcc},
    {"dsc3calca5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xd0},  {"dsc3calca6", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xd4},  {"dsc3calca7", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xd8},
    {"desccalcb1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xdc},  {"desccalcb2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xe0},  {"desccalcb3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xe4},
    {"desccalcb4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xe8},  {"desccalcb5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xec},  {"desccalcb6", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xf0},
    {"dsc2calcb1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xf4},  {"dsc2calcb2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xf8},  {"dsc2calcb3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xfc},
    {"dsc2calcb4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x100}, {"dsc3calcb1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x104}, {"dsc3calcb2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x108},
    {"dsc3calcb3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x10c}, {"dsc3calcb4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x110}, {"dsc3calcb5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x114},
    {"dsc3calcb6", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x118}, {"dsc3calcb7", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x11c}, {"end", FIELDTYPE_END, 0x0, 0x120},
};
static BinField skillsTable[] = {
    {"skill", FIELDTYPE_NAME_TO_INDEX, 0x0, 0x0},
    {"decquant", FIELDTYPE_DATA_BIT, 0x0, 0x4},
    {"lob", FIELDTYPE_DATA_BIT, 0x1, 0x4},
    {"progressive", FIELDTYPE_DATA_BIT, 0x2, 0x4},
    {"finishing", FIELDTYPE_DATA_BIT, 0x3, 0x4},
    {"passive", FIELDTYPE_DATA_BIT, 0x4, 0x4},
    {"aura", FIELDTYPE_DATA_BIT, 0x5, 0x4},
    {"periodic", FIELDTYPE_DATA_BIT, 0x6, 0x4},
    {"prgstack", FIELDTYPE_DATA_BIT, 0x7, 0x4},
    {"InTown", FIELDTYPE_DATA_BIT, 0x8, 0x4},
    {"Kick", FIELDTYPE_DATA_BIT, 0x9, 0x4},
    {"InGame", FIELDTYPE_DATA_BIT, 0xa, 0x4},
    {"repeat", FIELDTYPE_DATA_BIT, 0xb, 0x4},
    {"stsuccessonly", FIELDTYPE_DATA_BIT, 0xc, 0x4},
    {"stsounddelay", FIELDTYPE_DATA_BIT, 0xd, 0x4},
    {"weaponsnd", FIELDTYPE_DATA_BIT, 0xe, 0x4},
    {"immediate", FIELDTYPE_DATA_BIT, 0xf, 0x4},
    {"noammo", FIELDTYPE_DATA_BIT, 0x10, 0x4},
    {"enhanceable", FIELDTYPE_DATA_BIT, 0x11, 0x4},
    {"durability", FIELDTYPE_DATA_BIT, 0x12, 0x4},
    {"UseAttackRate", FIELDTYPE_DATA_BIT, 0x13, 0x4},
    {"TargetableOnly", FIELDTYPE_DATA_BIT, 0x14, 0x4},
    {"SearchEnemyXY", FIELDTYPE_DATA_BIT, 0x15, 0x4},
    {"SearchEnemyNear", FIELDTYPE_DATA_BIT, 0x16, 0x4},
    {"SearchOpenXY", FIELDTYPE_DATA_BIT, 0x17, 0x4},
    {"TargetCorpse", FIELDTYPE_DATA_BIT, 0x18, 0x4},
    {"TargetPet", FIELDTYPE_DATA_BIT, 0x19, 0x4},
    {"TargetAlly", FIELDTYPE_DATA_BIT, 0x1a, 0x4},
    {"TargetItem", FIELDTYPE_DATA_BIT, 0x1b, 0x4},
    {"AttackNoMana", FIELDTYPE_DATA_BIT, 0x1c, 0x4},
    {"ItemTgtDo", FIELDTYPE_DATA_BIT, 0x1d, 0x4},
    {"leftskill", FIELDTYPE_DATA_BIT, 0x1e, 0x4},
    {"interrupt", FIELDTYPE_DATA_BIT, 0x1f, 0x4},
    {"TgtPlaceCheck", FIELDTYPE_DATA_BIT, 0x20, 0x4},
    {"ItemCheckStart", FIELDTYPE_DATA_BIT, 0x21, 0x4},
    {"ItemCltCheckStart", FIELDTYPE_DATA_BIT, 0x22, 0x4},
    {"general", FIELDTYPE_DATA_BIT, 0x23, 0x4},
    {"scroll", FIELDTYPE_DATA_BIT, 0x24, 0x4},
    {"usemanaondo", FIELDTYPE_DATA_BIT, 0x25, 0x4},
    {"warp", FIELDTYPE_DATA_BIT, 0x26, 0x4},
    {"charclass", FIELDTYPE_CODE_TO_BYTE, 0x0, 0xc},
    {"anim", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x10},
    {"monanim", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x11},
    {"seqtrans", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x12},
    {"seqnum", FIELDTYPE_DATA_BYTE, 0x0, 0x13},
    {"range", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x14},
    {"SelectProc", FIELDTYPE_DATA_BYTE, 0x0, 0x15},
    {"seqinput", FIELDTYPE_DATA_BYTE, 0x0, 0x16},
    {"itypea1", FIELDTYPE_CODE_TO_WORD, 0x0, 0x18},
    {"itypea2", FIELDTYPE_CODE_TO_WORD, 0x0, 0x1a},
    {"itypea3", FIELDTYPE_CODE_TO_WORD, 0x0, 0x1c},
    {"itypeb1", FIELDTYPE_CODE_TO_WORD, 0x0, 0x1e},
    {"itypeb2", FIELDTYPE_CODE_TO_WORD, 0x0, 0x20},
    {"itypeb3", FIELDTYPE_CODE_TO_WORD, 0x0, 0x22},
    {"etypea1", FIELDTYPE_CODE_TO_WORD, 0x0, 0x24},
    {"etypea2", FIELDTYPE_CODE_TO_WORD, 0x0, 0x26},
    {"etypeb1", FIELDTYPE_CODE_TO_WORD, 0x0, 0x28},
    {"etypeb2", FIELDTYPE_CODE_TO_WORD, 0x0, 0x2a},
    {"srvstfunc", FIELDTYPE_DATA_WORD, 0x0, 0x2c},
    {"srvdofunc", FIELDTYPE_DATA_WORD, 0x0, 0x2e},
    {"srvprgfunc1", FIELDTYPE_DATA_WORD, 0x0, 0x30},
    {"srvprgfunc2", FIELDTYPE_DATA_WORD, 0x0, 0x32},
    {"srvprgfunc3", FIELDTYPE_DATA_WORD, 0x0, 0x34},
    {"prgcalc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x38},
    {"prgcalc2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x3c},
    {"prgcalc3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x40},
    {"prgdam", FIELDTYPE_DATA_BYTE, 0x0, 0x44},
    {"srvmissile", FIELDTYPE_NAME_TO_WORD, 0x0, 0x46},
    {"srvmissilea", FIELDTYPE_NAME_TO_WORD, 0x0, 0x48},
    {"srvmissileb", FIELDTYPE_NAME_TO_WORD, 0x0, 0x4a},
    {"srvmissilec", FIELDTYPE_NAME_TO_WORD, 0x0, 0x4c},
    {"srvoverlay", FIELDTYPE_NAME_TO_WORD, 0x0, 0x4e},
    {"aurafilter", FIELDTYPE_DATA_DWORD, 0x0, 0x50},
    {"aurastat1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x54},
    {"aurastat2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x56},
    {"aurastat3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x58},
    {"aurastat4", FIELDTYPE_NAME_TO_WORD, 0x0, 0x5a},
    {"aurastat5", FIELDTYPE_NAME_TO_WORD, 0x0, 0x5c},
    {"aurastat6", FIELDTYPE_NAME_TO_WORD, 0x0, 0x5e},
    {"auralencalc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x60},
    {"aurarangecalc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x64},
    {"aurastatcalc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x68},
    {"aurastatcalc2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x6c},
    {"aurastatcalc3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x70},
    {"aurastatcalc4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x74},
    {"aurastatcalc5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x78},
    {"aurastatcalc6", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x7c},
    {"aurastate", FIELDTYPE_NAME_TO_WORD, 0x0, 0x80},
    {"auratargetstate", FIELDTYPE_NAME_TO_WORD, 0x0, 0x82},
    {"auraevent1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x84},
    {"auraevent2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x86},
    {"auraevent3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x88},
    {"auraeventfunc1", FIELDTYPE_DATA_WORD, 0x0, 0x8a},
    {"auraeventfunc2", FIELDTYPE_DATA_WORD, 0x0, 0x8c},
    {"auraeventfunc3", FIELDTYPE_DATA_WORD, 0x0, 0x8e},
    {"auratgtevent", FIELDTYPE_NAME_TO_WORD, 0x0, 0x90},
    {"auratgteventfunc", FIELDTYPE_DATA_WORD, 0x0, 0x92},
    {"passivestate", FIELDTYPE_NAME_TO_WORD, 0x0, 0x94},
    {"passiveitype", FIELDTYPE_CODE_TO_WORD, 0x0, 0x96},
    {"passivestat1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x98},
    {"passivestat2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9a},
    {"passivestat3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9c},
    {"passivestat4", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9e},
    {"passivestat5", FIELDTYPE_NAME_TO_WORD, 0x0, 0xa0},
    {"passivecalc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa4},
    {"passivecalc2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa8},
    {"passivecalc3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xac},
    {"passivecalc4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb0},
    {"passivecalc5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb4},
    {"passiveevent", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb8},
    {"passiveeventfunc", FIELDTYPE_DATA_WORD, 0x0, 0xba},
    {"summon", FIELDTYPE_NAME_TO_WORD, 0x0, 0xbc},
    {"pettype", FIELDTYPE_NAME_TO_WORD_2, 0x0, 0xbe},
    {"summode", FIELDTYPE_CODE_TO_BYTE, 0x0, 0xbf},
    {"petmax", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xc0},
    {"sumskill1", FIELDTYPE_NAME_TO_WORD, 0x0, 0xc4},
    {"sumskill2", FIELDTYPE_NAME_TO_WORD, 0x0, 0xc6},
    {"sumskill3", FIELDTYPE_NAME_TO_WORD, 0x0, 0xc8},
    {"sumskill4", FIELDTYPE_NAME_TO_WORD, 0x0, 0xca},
    {"sumskill5", FIELDTYPE_NAME_TO_WORD, 0x0, 0xcc},
    {"sumsk1calc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xd0},
    {"sumsk2calc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xd4},
    {"sumsk3calc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xd8},
    {"sumsk4calc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xdc},
    {"sumsk5calc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xe0},
    {"sumumod", FIELDTYPE_DATA_WORD, 0x0, 0xe4},
    {"sumoverlay", FIELDTYPE_NAME_TO_WORD, 0x0, 0xe6},
    {"cltmissile", FIELDTYPE_NAME_TO_WORD, 0x0, 0xe8},
    {"cltmissilea", FIELDTYPE_NAME_TO_WORD, 0x0, 0xea},
    {"cltmissileb", FIELDTYPE_NAME_TO_WORD, 0x0, 0xec},
    {"cltmissilec", FIELDTYPE_NAME_TO_WORD, 0x0, 0xee},
    {"cltmissiled", FIELDTYPE_NAME_TO_WORD, 0x0, 0xf0},
    {"cltstfunc", FIELDTYPE_DATA_WORD, 0x0, 0xf2},
    {"cltdofunc", FIELDTYPE_DATA_WORD, 0x0, 0xf4},
    {"cltprgfunc1", FIELDTYPE_DATA_WORD, 0x0, 0xf6},
    {"cltprgfunc2", FIELDTYPE_DATA_WORD, 0x0, 0xf8},
    {"cltprgfunc3", FIELDTYPE_DATA_WORD, 0x0, 0xfa},
    {"stsound", FIELDTYPE_NAME_TO_WORD, 0x0, 0xfc},
    {"stsoundclass", FIELDTYPE_NAME_TO_WORD, 0x0, 0xfe},
    {"dosound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x100},
    {"dosound a", FIELDTYPE_NAME_TO_WORD, 0x0, 0x102},
    {"dosound b", FIELDTYPE_NAME_TO_WORD, 0x0, 0x104},
    {"castoverlay", FIELDTYPE_NAME_TO_WORD, 0x0, 0x106},
    {"tgtoverlay", FIELDTYPE_NAME_TO_WORD, 0x0, 0x108},
    {"tgtsound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x10a},
    {"prgoverlay", FIELDTYPE_NAME_TO_WORD, 0x0, 0x10c},
    {"prgsound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x10e},
    {"cltoverlaya", FIELDTYPE_NAME_TO_WORD, 0x0, 0x110},
    {"cltoverlayb", FIELDTYPE_NAME_TO_WORD, 0x0, 0x112},
    {"cltcalc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x114},
    {"cltcalc2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x118},
    {"cltcalc3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x11c},
    {"ItemTarget", FIELDTYPE_DATA_BYTE, 0x0, 0x120},
    {"ItemCastSound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x122},
    {"ItemCastOverlay", FIELDTYPE_NAME_TO_WORD, 0x0, 0x124},
    {"perdelay", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x128},
    {"maxlvl", FIELDTYPE_DATA_WORD, 0x0, 0x12c},
    {"ResultFlags", FIELDTYPE_DATA_WORD, 0x0, 0x12e},
    {"HitFlags", FIELDTYPE_DATA_DWORD_2, 0x0, 0x130},
    {"HitClass", FIELDTYPE_DATA_DWORD_2, 0x0, 0x134},
    {"calc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x138},
    {"calc2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x13c},
    {"calc3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x140},
    {"calc4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x144},
    {"Param1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x148},
    {"Param2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x14c},
    {"Param3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x150},
    {"Param4", FIELDTYPE_DATA_DWORD_2, 0x0, 0x154},
    {"Param5", FIELDTYPE_DATA_DWORD_2, 0x0, 0x158},
    {"Param6", FIELDTYPE_DATA_DWORD_2, 0x0, 0x15c},
    {"Param7", FIELDTYPE_DATA_DWORD_2, 0x0, 0x160},
    {"Param8", FIELDTYPE_DATA_DWORD_2, 0x0, 0x164},
    {"weapsel", FIELDTYPE_DATA_BYTE, 0x0, 0x168},
    {"ItemEffect", FIELDTYPE_DATA_WORD, 0x0, 0x16a},
    {"ItemCltEffect", FIELDTYPE_DATA_WORD, 0x0, 0x16c},
    {"skpoints", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x170},
    {"reqlevel", FIELDTYPE_DATA_WORD, 0x0, 0x174},
    {"reqstr", FIELDTYPE_DATA_WORD, 0x0, 0x176},
    {"reqdex", FIELDTYPE_DATA_WORD, 0x0, 0x178},
    {"reqint", FIELDTYPE_DATA_WORD, 0x0, 0x17a},
    {"reqvit", FIELDTYPE_DATA_WORD, 0x0, 0x17c},
    {"reqskill1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x17e},
    {"reqskill2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x180},
    {"reqskill3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x182},
    {"startmana", FIELDTYPE_DATA_WORD, 0x0, 0x184},
    {"minmana", FIELDTYPE_DATA_WORD, 0x0, 0x186},
    {"manashift", FIELDTYPE_DATA_WORD, 0x0, 0x188},
    {"mana", FIELDTYPE_DATA_WORD, 0x0, 0x18a},
    {"lvlmana", FIELDTYPE_DATA_WORD, 0x0, 0x18c},
    {"attackrank", FIELDTYPE_DATA_BYTE, 0x0, 0x18e},
    {"lineofsight", FIELDTYPE_DATA_BYTE, 0x0, 0x18f},
    {"delay", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x190},
    {"skilldesc", FIELDTYPE_NAME_TO_WORD, 0x0, 0x194},
    {"ToHit", FIELDTYPE_DATA_DWORD, 0x0, 0x198},
    {"LevToHit", FIELDTYPE_DATA_DWORD, 0x0, 0x19c},
    {"ToHitCalc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x1a0},
    {"HitShift", FIELDTYPE_DATA_BYTE, 0x0, 0x1a4},
    {"SrcDam", FIELDTYPE_DATA_BYTE, 0x0, 0x1a5},
    {"MinDam", FIELDTYPE_DATA_DWORD, 0x0, 0x1a8},
    {"MaxDam", FIELDTYPE_DATA_DWORD, 0x0, 0x1ac},
    {"MinLevDam1", FIELDTYPE_DATA_DWORD, 0x0, 0x1b0},
    {"MinLevDam2", FIELDTYPE_DATA_DWORD, 0x0, 0x1b4},
    {"MinLevDam3", FIELDTYPE_DATA_DWORD, 0x0, 0x1b8},
    {"MinLevDam4", FIELDTYPE_DATA_DWORD, 0x0, 0x1bc},
    {"MinLevDam5", FIELDTYPE_DATA_DWORD, 0x0, 0x1c0},
    {"MaxLevDam1", FIELDTYPE_DATA_DWORD, 0x0, 0x1c4},
    {"MaxLevDam2", FIELDTYPE_DATA_DWORD, 0x0, 0x1c8},
    {"MaxLevDam3", FIELDTYPE_DATA_DWORD, 0x0, 0x1cc},
    {"MaxLevDam4", FIELDTYPE_DATA_DWORD, 0x0, 0x1d0},
    {"MaxLevDam5", FIELDTYPE_DATA_DWORD, 0x0, 0x1d4},
    {"DmgSymPerCalc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x1d8},
    {"EType", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x1dc},
    {"EMin", FIELDTYPE_DATA_DWORD, 0x0, 0x1e0},
    {"EMax", FIELDTYPE_DATA_DWORD, 0x0, 0x1e4},
    {"EMinLev1", FIELDTYPE_DATA_DWORD, 0x0, 0x1e8},
    {"EMinLev2", FIELDTYPE_DATA_DWORD, 0x0, 0x1ec},
    {"EMinLev3", FIELDTYPE_DATA_DWORD, 0x0, 0x1f0},
    {"EMinLev4", FIELDTYPE_DATA_DWORD, 0x0, 0x1f4},
    {"EMinLev5", FIELDTYPE_DATA_DWORD, 0x0, 0x1f8},
    {"EMaxLev1", FIELDTYPE_DATA_DWORD, 0x0, 0x1fc},
    {"EMaxLev2", FIELDTYPE_DATA_DWORD, 0x0, 0x200},
    {"EMaxLev3", FIELDTYPE_DATA_DWORD, 0x0, 0x204},
    {"EMaxLev4", FIELDTYPE_DATA_DWORD, 0x0, 0x208},
    {"EMaxLev5", FIELDTYPE_DATA_DWORD, 0x0, 0x20c},
    {"EDmgSymPerCalc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x210},
    {"ELen", FIELDTYPE_DATA_DWORD, 0x0, 0x214},
    {"ELevLen1", FIELDTYPE_DATA_DWORD, 0x0, 0x218},
    {"ELevLen2", FIELDTYPE_DATA_DWORD, 0x0, 0x21c},
    {"ELevLen3", FIELDTYPE_DATA_DWORD, 0x0, 0x220},
    {"ELenSymPerCalc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x224},
    {"restrict", FIELDTYPE_DATA_BYTE, 0x0, 0x228},
    {"state1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x22a},
    {"state2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x22c},
    {"state3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x22e},
    {"aitype", FIELDTYPE_DATA_BYTE, 0x0, 0x230},
    {"aibonus", FIELDTYPE_DATA_WORD, 0x0, 0x232},
    {"cost mult", FIELDTYPE_DATA_DWORD, 0x0, 0x234},
    {"cost add", FIELDTYPE_DATA_DWORD, 0x0, 0x238},
    {"end", FIELDTYPE_END, 0x0, 0x23c},
};
static BinField objectsTable[] = {
    {"Name", FIELDTYPE_DATA_ASCII, 0x3f, 0x0},
    {"Token", FIELDTYPE_DATA_ASCII, 0x2, 0xc0},
    {"SpawnMax", FIELDTYPE_DATA_BYTE, 0x0, 0xc3},
    {"Selectable0", FIELDTYPE_DATA_BYTE, 0x0, 0xc4},
    {"Selectable1", FIELDTYPE_DATA_BYTE, 0x0, 0xc5},
    {"Selectable2", FIELDTYPE_DATA_BYTE, 0x0, 0xc6},
    {"Selectable3", FIELDTYPE_DATA_BYTE, 0x0, 0xc7},
    {"Selectable4", FIELDTYPE_DATA_BYTE, 0x0, 0xc8},
    {"Selectable5", FIELDTYPE_DATA_BYTE, 0x0, 0xc9},
    {"Selectable6", FIELDTYPE_DATA_BYTE, 0x0, 0xca},
    {"Selectable7", FIELDTYPE_DATA_BYTE, 0x0, 0xcb},
    {"TrapProb", FIELDTYPE_DATA_BYTE, 0x0, 0xcc},
    {"SizeX", FIELDTYPE_DATA_DWORD, 0x0, 0xd0},
    {"SizeY", FIELDTYPE_DATA_DWORD, 0x0, 0xd4},
    {"FrameCnt0", FIELDTYPE_DATA_DWORD, 0x0, 0xd8},
    {"FrameCnt1", FIELDTYPE_DATA_DWORD, 0x0, 0xdc},
    {"FrameCnt2", FIELDTYPE_DATA_DWORD, 0x0, 0xe0},
    {"FrameCnt3", FIELDTYPE_DATA_DWORD, 0x0, 0xe4},
    {"FrameCnt4", FIELDTYPE_DATA_DWORD, 0x0, 0xe8},
    {"FrameCnt5", FIELDTYPE_DATA_DWORD, 0x0, 0xec},
    {"FrameCnt6", FIELDTYPE_DATA_DWORD, 0x0, 0xf0},
    {"FrameCnt7", FIELDTYPE_DATA_DWORD, 0x0, 0xf4},
    {"FrameDelta0", FIELDTYPE_DATA_WORD, 0x0, 0xf8},
    {"FrameDelta1", FIELDTYPE_DATA_WORD, 0x0, 0xfa},
    {"FrameDelta2", FIELDTYPE_DATA_WORD, 0x0, 0xfc},
    {"FrameDelta3", FIELDTYPE_DATA_WORD, 0x0, 0xfe},
    {"FrameDelta4", FIELDTYPE_DATA_WORD, 0x0, 0x100},
    {"FrameDelta5", FIELDTYPE_DATA_WORD, 0x0, 0x102},
    {"FrameDelta6", FIELDTYPE_DATA_WORD, 0x0, 0x104},
    {"FrameDelta7", FIELDTYPE_DATA_WORD, 0x0, 0x106},
    {"CycleAnim0", FIELDTYPE_DATA_BYTE, 0x0, 0x108},
    {"CycleAnim1", FIELDTYPE_DATA_BYTE, 0x0, 0x109},
    {"CycleAnim2", FIELDTYPE_DATA_BYTE, 0x0, 0x10a},
    {"CycleAnim3", FIELDTYPE_DATA_BYTE, 0x0, 0x10b},
    {"CycleAnim4", FIELDTYPE_DATA_BYTE, 0x0, 0x10c},
    {"CycleAnim5", FIELDTYPE_DATA_BYTE, 0x0, 0x10d},
    {"CycleAnim6", FIELDTYPE_DATA_BYTE, 0x0, 0x10e},
    {"CycleAnim7", FIELDTYPE_DATA_BYTE, 0x0, 0x10f},
    {"Lit0", FIELDTYPE_DATA_BYTE, 0x0, 0x110},
    {"Lit1", FIELDTYPE_DATA_BYTE, 0x0, 0x111},
    {"Lit2", FIELDTYPE_DATA_BYTE, 0x0, 0x112},
    {"Lit3", FIELDTYPE_DATA_BYTE, 0x0, 0x113},
    {"Lit4", FIELDTYPE_DATA_BYTE, 0x0, 0x114},
    {"Lit5", FIELDTYPE_DATA_BYTE, 0x0, 0x115},
    {"Lit6", FIELDTYPE_DATA_BYTE, 0x0, 0x116},
    {"Lit7", FIELDTYPE_DATA_BYTE, 0x0, 0x117},
    {"BlocksLight0", FIELDTYPE_DATA_BYTE, 0x0, 0x118},
    {"BlocksLight1", FIELDTYPE_DATA_BYTE, 0x0, 0x119},
    {"BlocksLight2", FIELDTYPE_DATA_BYTE, 0x0, 0x11a},
    {"BlocksLight3", FIELDTYPE_DATA_BYTE, 0x0, 0x11b},
    {"BlocksLight4", FIELDTYPE_DATA_BYTE, 0x0, 0x11c},
    {"BlocksLight5", FIELDTYPE_DATA_BYTE, 0x0, 0x11d},
    {"BlocksLight6", FIELDTYPE_DATA_BYTE, 0x0, 0x11e},
    {"BlocksLight7", FIELDTYPE_DATA_BYTE, 0x0, 0x11f},
    {"HasCollision0", FIELDTYPE_DATA_BYTE, 0x0, 0x120},
    {"HasCollision1", FIELDTYPE_DATA_BYTE, 0x0, 0x121},
    {"HasCollision2", FIELDTYPE_DATA_BYTE, 0x0, 0x122},
    {"HasCollision3", FIELDTYPE_DATA_BYTE, 0x0, 0x123},
    {"HasCollision4", FIELDTYPE_DATA_BYTE, 0x0, 0x124},
    {"HasCollision5", FIELDTYPE_DATA_BYTE, 0x0, 0x125},
    {"HasCollision6", FIELDTYPE_DATA_BYTE, 0x0, 0x126},
    {"HasCollision7", FIELDTYPE_DATA_BYTE, 0x0, 0x127},
    {"IsAttackable0", FIELDTYPE_DATA_BYTE, 0x0, 0x128},
    {"Start0", FIELDTYPE_DATA_BYTE, 0x0, 0x129},
    {"Start1", FIELDTYPE_DATA_BYTE, 0x0, 0x12a},
    {"Start2", FIELDTYPE_DATA_BYTE, 0x0, 0x12b},
    {"Start3", FIELDTYPE_DATA_BYTE, 0x0, 0x12c},
    {"Start4", FIELDTYPE_DATA_BYTE, 0x0, 0x12d},
    {"Start5", FIELDTYPE_DATA_BYTE, 0x0, 0x12e},
    {"Start6", FIELDTYPE_DATA_BYTE, 0x0, 0x12f},
    {"Start7", FIELDTYPE_DATA_BYTE, 0x0, 0x130},
    {"OrderFlag0", FIELDTYPE_DATA_BYTE, 0x0, 0x131},
    {"OrderFlag1", FIELDTYPE_DATA_BYTE, 0x0, 0x132},
    {"OrderFlag2", FIELDTYPE_DATA_BYTE, 0x0, 0x133},
    {"OrderFlag3", FIELDTYPE_DATA_BYTE, 0x0, 0x134},
    {"OrderFlag4", FIELDTYPE_DATA_BYTE, 0x0, 0x135},
    {"OrderFlag5", FIELDTYPE_DATA_BYTE, 0x0, 0x136},
    {"OrderFlag6", FIELDTYPE_DATA_BYTE, 0x0, 0x137},
    {"OrderFlag7", FIELDTYPE_DATA_BYTE, 0x0, 0x138},
    {"EnvEffect", FIELDTYPE_DATA_BYTE, 0x0, 0x139},
    {"IsDoor", FIELDTYPE_DATA_BYTE, 0x0, 0x13a},
    {"BlocksVis", FIELDTYPE_DATA_BYTE, 0x0, 0x13b},
    {"Orientation", FIELDTYPE_DATA_BYTE, 0x0, 0x13c},
    {"PreOperate", FIELDTYPE_DATA_BYTE, 0x0, 0x13d},
    {"Trans", FIELDTYPE_DATA_BYTE, 0x0, 0x13e},
    {"Mode0", FIELDTYPE_DATA_BYTE, 0x0, 0x13f},
    {"Mode1", FIELDTYPE_DATA_BYTE, 0x0, 0x140},
    {"Mode2", FIELDTYPE_DATA_BYTE, 0x0, 0x141},
    {"Mode3", FIELDTYPE_DATA_BYTE, 0x0, 0x142},
    {"Mode4", FIELDTYPE_DATA_BYTE, 0x0, 0x143},
    {"Mode5", FIELDTYPE_DATA_BYTE, 0x0, 0x144},
    {"Mode6", FIELDTYPE_DATA_BYTE, 0x0, 0x145},
    {"Mode7", FIELDTYPE_DATA_BYTE, 0x0, 0x146},
    {"Xoffset", FIELDTYPE_DATA_DWORD_2, 0x0, 0x148},
    {"Yoffset", FIELDTYPE_DATA_DWORD_2, 0x0, 0x14c},
    {"Draw", FIELDTYPE_DATA_BYTE, 0x0, 0x150},
    {"HD", FIELDTYPE_DATA_BYTE, 0x0, 0x151},
    {"TR", FIELDTYPE_DATA_BYTE, 0x0, 0x152},
    {"LG", FIELDTYPE_DATA_BYTE, 0x0, 0x153},
    {"RA", FIELDTYPE_DATA_BYTE, 0x0, 0x154},
    {"LA", FIELDTYPE_DATA_BYTE, 0x0, 0x155},
    {"RH", FIELDTYPE_DATA_BYTE, 0x0, 0x156},
    {"LH", FIELDTYPE_DATA_BYTE, 0x0, 0x157},
    {"SH", FIELDTYPE_DATA_BYTE, 0x0, 0x158},
    {"S1", FIELDTYPE_DATA_BYTE, 0x0, 0x159},
    {"S2", FIELDTYPE_DATA_BYTE, 0x0, 0x15a},
    {"S3", FIELDTYPE_DATA_BYTE, 0x0, 0x15b},
    {"S4", FIELDTYPE_DATA_BYTE, 0x0, 0x15c},
    {"S5", FIELDTYPE_DATA_BYTE, 0x0, 0x15d},
    {"S6", FIELDTYPE_DATA_BYTE, 0x0, 0x15e},
    {"S7", FIELDTYPE_DATA_BYTE, 0x0, 0x15f},
    {"S8", FIELDTYPE_DATA_BYTE, 0x0, 0x160},
    {"TotalPieces", FIELDTYPE_DATA_BYTE, 0x0, 0x161},
    {"XSpace", FIELDTYPE_DATA_BYTE, 0x0, 0x162},
    {"YSpace", FIELDTYPE_DATA_BYTE, 0x0, 0x163},
    {"Red", FIELDTYPE_DATA_BYTE, 0x0, 0x164},
    {"Green", FIELDTYPE_DATA_BYTE, 0x0, 0x165},
    {"Blue", FIELDTYPE_DATA_BYTE, 0x0, 0x166},
    {"SubClass", FIELDTYPE_DATA_BYTE, 0x0, 0x167},
    {"NameOffset", FIELDTYPE_DATA_DWORD_2, 0x0, 0x168},
    {"MonsterOK", FIELDTYPE_DATA_BYTE, 0x0, 0x16d},
    {"OperateRange", FIELDTYPE_DATA_BYTE, 0x0, 0x16e},
    {"ShrineFunction", FIELDTYPE_DATA_BYTE, 0x0, 0x16f},
    {"Act", FIELDTYPE_DATA_BYTE, 0x0, 0x170},
    {"Lockable", FIELDTYPE_DATA_BYTE, 0x0, 0x171},
    {"Gore", FIELDTYPE_DATA_BYTE, 0x0, 0x172},
    {"Restore", FIELDTYPE_DATA_BYTE, 0x0, 0x173},
    {"RestoreVirgins", FIELDTYPE_DATA_BYTE, 0x0, 0x174},
    {"Sync", FIELDTYPE_DATA_BYTE, 0x0, 0x175},
    {"Parm0", FIELDTYPE_DATA_DWORD_2, 0x0, 0x178},
    {"Parm1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x17c},
    {"Parm2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x180},
    {"Parm3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x184},
    {"Parm4", FIELDTYPE_DATA_DWORD_2, 0x0, 0x188},
    {"Parm5", FIELDTYPE_DATA_DWORD_2, 0x0, 0x18c},
    {"Parm6", FIELDTYPE_DATA_DWORD_2, 0x0, 0x190},
    {"Parm7", FIELDTYPE_DATA_DWORD_2, 0x0, 0x194},
    {"nTgtFX", FIELDTYPE_DATA_BYTE, 0x0, 0x198},
    {"nTgtFY", FIELDTYPE_DATA_BYTE, 0x0, 0x199},
    {"nTgtBX", FIELDTYPE_DATA_BYTE, 0x0, 0x19a},
    {"nTgtBY", FIELDTYPE_DATA_BYTE, 0x0, 0x19b},
    {"Damage", FIELDTYPE_DATA_BYTE, 0x0, 0x19c},
    {"CollisionSubst", FIELDTYPE_DATA_BYTE, 0x0, 0x19d},
    {"Left", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1a0},
    {"Top", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1a4},
    {"Width", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1a8},
    {"Height", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1ac},
    {"Beta", FIELDTYPE_DATA_BYTE, 0x0, 0x1b0},
    {"InitFn", FIELDTYPE_DATA_BYTE, 0x0, 0x1b1},
    {"PopulateFn", FIELDTYPE_DATA_BYTE, 0x0, 0x1b2},
    {"OperateFn", FIELDTYPE_DATA_BYTE, 0x0, 0x1b3},
    {"ClientFn", FIELDTYPE_DATA_BYTE, 0x0, 0x1b4},
    {"Overlay", FIELDTYPE_DATA_BYTE, 0x0, 0x1b5},
    {"BlockMissile", FIELDTYPE_DATA_BYTE, 0x0, 0x1b6},
    {"DrawUnder", FIELDTYPE_DATA_BYTE, 0x0, 0x1b7},
    {"OpenWarp", FIELDTYPE_DATA_BYTE, 0x0, 0x1b8},
    {"AutoMap", FIELDTYPE_DATA_DWORD, 0x0, 0x1bc},
    {"end", FIELDTYPE_END, 0x0, 0x1c0},
};
static BinField missilesTable[] = {
    {"Missile", FIELDTYPE_NAME_TO_INDEX, 0x0, 0x0},
    {"LastCollide", FIELDTYPE_DATA_BIT, 0x0, 0x4},
    {"Explosion", FIELDTYPE_DATA_BIT, 0x1, 0x4},
    {"Pierce", FIELDTYPE_DATA_BIT, 0x2, 0x4},
    {"CanSlow", FIELDTYPE_DATA_BIT, 0x3, 0x4},
    {"CanDestroy", FIELDTYPE_DATA_BIT, 0x4, 0x4},
    {"ClientSend", FIELDTYPE_DATA_BIT, 0x5, 0x4},
    {"GetHit", FIELDTYPE_DATA_BIT, 0x6, 0x4},
    {"SoftHit", FIELDTYPE_DATA_BIT, 0x7, 0x4},
    {"ApplyMastery", FIELDTYPE_DATA_BIT, 0x8, 0x4},
    {"ReturnFire", FIELDTYPE_DATA_BIT, 0x9, 0x4},
    {"Town", FIELDTYPE_DATA_BIT, 0xa, 0x4},
    {"SrcTown", FIELDTYPE_DATA_BIT, 0xb, 0x4},
    {"NoMultiShot", FIELDTYPE_DATA_BIT, 0xc, 0x4},
    {"NoUniqueMod", FIELDTYPE_DATA_BIT, 0xd, 0x4},
    {"Half2HSrc", FIELDTYPE_DATA_BIT, 0xe, 0x4},
    {"MissileSkill", FIELDTYPE_DATA_BIT, 0xf, 0x4},
    {"pCltDoFunc", FIELDTYPE_DATA_WORD, 0x0, 0x8},
    {"pCltHitFunc", FIELDTYPE_DATA_WORD, 0x0, 0xa},
    {"pSrvDoFunc", FIELDTYPE_DATA_WORD, 0x0, 0xc},
    {"pSrvHitFunc", FIELDTYPE_DATA_WORD, 0x0, 0xe},
    {"pSrvDmgFunc", FIELDTYPE_DATA_WORD, 0x0, 0x10},
    {"TravelSound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x12},
    {"HitSound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x14},
    {"ExplosionMissile", FIELDTYPE_NAME_TO_WORD, 0x0, 0x16},
    {"SubMissile1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x18},
    {"SubMissile2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x1a},
    {"SubMissile3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x1c},
    {"CltSubMissile1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x1e},
    {"CltSubMissile2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x20},
    {"CltSubMissile3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x22},
    {"HitSubMissile1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x24},
    {"HitSubMissile2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x26},
    {"HitSubMissile3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x28},
    {"HitSubMissile4", FIELDTYPE_NAME_TO_WORD, 0x0, 0x2a},
    {"CltHitSubMissile1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x2c},
    {"CltHitSubMissile2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x2e},
    {"CltHitSubMissile3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x30},
    {"CltHitSubMissile4", FIELDTYPE_NAME_TO_WORD, 0x0, 0x32},
    {"ProgSound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x34},
    {"ProgOverlay", FIELDTYPE_NAME_TO_WORD, 0x0, 0x36},
    {"Param1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x38},
    {"Param2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x3c},
    {"Param3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x40},
    {"Param4", FIELDTYPE_DATA_DWORD_2, 0x0, 0x44},
    {"Param5", FIELDTYPE_DATA_DWORD_2, 0x0, 0x48},
    {"sHitPar1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x4c},
    {"sHitPar2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x50},
    {"sHitPar3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x54},
    {"CltParam1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x58},
    {"CltParam2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x5c},
    {"CltParam3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x60},
    {"CltParam4", FIELDTYPE_DATA_DWORD_2, 0x0, 0x64},
    {"CltParam5", FIELDTYPE_DATA_DWORD_2, 0x0, 0x68},
    {"cHitPar1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x6c},
    {"cHitPar2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x70},
    {"cHitPar3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x74},
    {"dParam1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x78},
    {"dParam2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x7c},
    {"SrvCalc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x80},
    {"CltCalc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x84},
    {"SHitCalc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x88},
    {"CHitCalc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x8c},
    {"DmgCalc1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x90},
    {"HitClass", FIELDTYPE_DATA_BYTE, 0x0, 0x94},
    {"Range", FIELDTYPE_DATA_WORD, 0x0, 0x96},
    {"LevRange", FIELDTYPE_DATA_WORD, 0x0, 0x98},
    {"Vel", FIELDTYPE_DATA_BYTE, 0x0, 0x9a},
    {"VelLev", FIELDTYPE_DATA_BYTE, 0x0, 0x9b},
    {"MaxVel", FIELDTYPE_DATA_BYTE, 0x0, 0x9c},
    {"Accel", FIELDTYPE_DATA_WORD, 0x0, 0x9e},
    {"animrate", FIELDTYPE_DATA_WORD, 0x0, 0xa0},
    {"xoffset", FIELDTYPE_DATA_WORD, 0x0, 0xa2},
    {"yoffset", FIELDTYPE_DATA_WORD, 0x0, 0xa4},
    {"zoffset", FIELDTYPE_DATA_WORD, 0x0, 0xa6},
    {"HitFlags", FIELDTYPE_DATA_DWORD_2, 0x0, 0xa8},
    {"ResultFlags", FIELDTYPE_DATA_WORD, 0x0, 0xac},
    {"KnockBack", FIELDTYPE_DATA_BYTE, 0x0, 0xae},
    {"MinDamage", FIELDTYPE_DATA_DWORD_2, 0x0, 0xb0},
    {"MaxDamage", FIELDTYPE_DATA_DWORD_2, 0x0, 0xb4},
    {"MinLevDam1", FIELDTYPE_DATA_DWORD_2, 0x0, 0xb8},
    {"MinLevDam2", FIELDTYPE_DATA_DWORD_2, 0x0, 0xbc},
    {"MinLevDam3", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc0},
    {"MinLevDam4", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc4},
    {"MinLevDam5", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc8},
    {"MaxLevDam1", FIELDTYPE_DATA_DWORD_2, 0x0, 0xcc},
    {"MaxLevDam2", FIELDTYPE_DATA_DWORD_2, 0x0, 0xd0},
    {"MaxLevDam3", FIELDTYPE_DATA_DWORD_2, 0x0, 0xd4},
    {"MaxLevDam4", FIELDTYPE_DATA_DWORD_2, 0x0, 0xd8},
    {"MaxLevDam5", FIELDTYPE_DATA_DWORD_2, 0x0, 0xdc},
    {"DmgSymPerCalc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xe0},
    {"EType", FIELDTYPE_CODE_TO_BYTE, 0x0, 0xe4},
    {"EMin", FIELDTYPE_DATA_DWORD_2, 0x0, 0xe8},
    {"EMax", FIELDTYPE_DATA_DWORD_2, 0x0, 0xec},
    {"MinELev1", FIELDTYPE_DATA_DWORD_2, 0x0, 0xf0},
    {"MinELev2", FIELDTYPE_DATA_DWORD_2, 0x0, 0xf4},
    {"MinELev3", FIELDTYPE_DATA_DWORD_2, 0x0, 0xf8},
    {"MinELev4", FIELDTYPE_DATA_DWORD_2, 0x0, 0xfc},
    {"MinELev5", FIELDTYPE_DATA_DWORD_2, 0x0, 0x100},
    {"MaxELev1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x104},
    {"MaxELev2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x108},
    {"MaxELev3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x10c},
    {"MaxELev4", FIELDTYPE_DATA_DWORD_2, 0x0, 0x110},
    {"MaxELev5", FIELDTYPE_DATA_DWORD_2, 0x0, 0x114},
    {"EDmgSymPerCalc", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x118},
    {"ELen", FIELDTYPE_DATA_DWORD_2, 0x0, 0x11c},
    {"ELevLen1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x120},
    {"ELevLen2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x124},
    {"ELevLen3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x128},
    {"CltSrcTown", FIELDTYPE_DATA_BYTE, 0x0, 0x12c},
    {"SrcDamage", FIELDTYPE_DATA_BYTE, 0x0, 0x12d},
    {"SrcMissDmg", FIELDTYPE_DATA_BYTE, 0x0, 0x12e},
    {"Holy", FIELDTYPE_DATA_BYTE, 0x0, 0x12f},
    {"Light", FIELDTYPE_DATA_BYTE, 0x0, 0x130},
    {"Flicker", FIELDTYPE_DATA_BYTE, 0x0, 0x131},
    {"Red", FIELDTYPE_DATA_BYTE, 0x0, 0x132},
    {"Green", FIELDTYPE_DATA_BYTE, 0x0, 0x133},
    {"Blue", FIELDTYPE_DATA_BYTE, 0x0, 0x134},
    {"InitSteps", FIELDTYPE_DATA_BYTE, 0x0, 0x135},
    {"Activate", FIELDTYPE_DATA_BYTE, 0x0, 0x136},
    {"LoopAnim", FIELDTYPE_DATA_BYTE, 0x0, 0x137},
    {"CelFile", FIELDTYPE_DATA_ASCII, 0x40, 0x138},
    {"AnimLen", FIELDTYPE_DATA_BYTE, 0x0, 0x178},
    {"RandStart", FIELDTYPE_DATA_DWORD_2, 0x0, 0x17c},
    {"SubLoop", FIELDTYPE_DATA_BYTE, 0x0, 0x180},
    {"SubStart", FIELDTYPE_DATA_BYTE, 0x0, 0x181},
    {"SubStop", FIELDTYPE_DATA_BYTE, 0x0, 0x182},
    {"CollideType", FIELDTYPE_DATA_BYTE, 0x0, 0x183},
    {"Collision", FIELDTYPE_DATA_BYTE, 0x0, 0x184},
    {"ClientCol", FIELDTYPE_DATA_BYTE, 0x0, 0x185},
    {"CollideKill", FIELDTYPE_DATA_BYTE, 0x0, 0x186},
    {"CollideFriend", FIELDTYPE_DATA_BYTE, 0x0, 0x187},
    {"NextHit", FIELDTYPE_DATA_BYTE, 0x0, 0x188},
    {"NextDelay", FIELDTYPE_DATA_BYTE, 0x0, 0x189},
    {"Size", FIELDTYPE_DATA_BYTE, 0x0, 0x18a},
    {"ToHit", FIELDTYPE_DATA_BYTE, 0x0, 0x18b},
    {"AlwaysExplode", FIELDTYPE_DATA_BYTE, 0x0, 0x18c},
    {"Trans", FIELDTYPE_DATA_BYTE, 0x0, 0x18d},
    {"Qty", FIELDTYPE_DATA_BYTE, 0x0, 0x18e},
    {"SpecialSetup", FIELDTYPE_DATA_DWORD_2, 0x0, 0x190},
    {"Skill", FIELDTYPE_NAME_TO_WORD, 0x0, 0x194},
    {"HitShift", FIELDTYPE_DATA_BYTE, 0x0, 0x196},
    {"DamageRate", FIELDTYPE_DATA_DWORD_2, 0x0, 0x19c},
    {"NumDirections", FIELDTYPE_DATA_BYTE, 0x0, 0x1a0},
    {"AnimSpeed", FIELDTYPE_DATA_BYTE, 0x0, 0x1a1},
    {"LocalBlood", FIELDTYPE_DATA_BYTE, 0x0, 0x1a2},
    {"end", FIELDTYPE_END, 0x0, 0x1a4},
};
static BinField monstats2Table[] = {
    {"Id", FIELDTYPE_NAME_TO_INDEX, 0x0, 0x0},
    {"noGfxHitTest", FIELDTYPE_DATA_BIT, 0x0, 0x4},
    {"noMap", FIELDTYPE_DATA_BIT, 0x1, 0x4},
    {"noOvly", FIELDTYPE_DATA_BIT, 0x2, 0x4},
    {"isSel", FIELDTYPE_DATA_BIT, 0x3, 0x4},
    {"alSel", FIELDTYPE_DATA_BIT, 0x4, 0x4},
    {"noSel", FIELDTYPE_DATA_BIT, 0x5, 0x4},
    {"shiftSel", FIELDTYPE_DATA_BIT, 0x6, 0x4},
    {"corpseSel", FIELDTYPE_DATA_BIT, 0x7, 0x4},
    {"revive", FIELDTYPE_DATA_BIT, 0x8, 0x4},
    {"isAtt", FIELDTYPE_DATA_BIT, 0x9, 0x4},
    {"small", FIELDTYPE_DATA_BIT, 0xa, 0x4},
    {"large", FIELDTYPE_DATA_BIT, 0xb, 0x4},
    {"soft", FIELDTYPE_DATA_BIT, 0xc, 0x4},
    {"critter", FIELDTYPE_DATA_BIT, 0xd, 0x4},
    {"shadow", FIELDTYPE_DATA_BIT, 0xe, 0x4},
    {"noUniqueShift", FIELDTYPE_DATA_BIT, 0xf, 0x4},
    {"compositeDeath", FIELDTYPE_DATA_BIT, 0x10, 0x4},
    {"inert", FIELDTYPE_DATA_BIT, 0x11, 0x4},
    {"objCol", FIELDTYPE_DATA_BIT, 0x12, 0x4},
    {"deadCol", FIELDTYPE_DATA_BIT, 0x13, 0x4},
    {"unflatDead", FIELDTYPE_DATA_BIT, 0x14, 0x4},
    {"SizeX", FIELDTYPE_DATA_BYTE, 0x0, 0x8},
    {"SizeY", FIELDTYPE_DATA_BYTE, 0x0, 0x9},
    {"spawnCol", FIELDTYPE_DATA_BYTE, 0x0, 0xa},
    {"Height", FIELDTYPE_DATA_BYTE, 0x0, 0xb},
    {"overlayHeight", FIELDTYPE_DATA_BYTE, 0x0, 0xc},
    {"pixHeight", FIELDTYPE_DATA_BYTE, 0x0, 0xd},
    {"MeleeRng", FIELDTYPE_DATA_BYTE, 0x0, 0xe},
    {"BaseW", FIELDTYPE_DATA_RAW, 0x0, 0x10},
    {"HitClass", FIELDTYPE_DATA_BYTE, 0x0, 0x14},
    {"HD", FIELDTYPE_DATA_BIT, 0x0, 0xe8},
    {"TR", FIELDTYPE_DATA_BIT, 0x1, 0xe8},
    {"LG", FIELDTYPE_DATA_BIT, 0x2, 0xe8},
    {"RA", FIELDTYPE_DATA_BIT, 0x3, 0xe8},
    {"LA", FIELDTYPE_DATA_BIT, 0x4, 0xe8},
    {"RH", FIELDTYPE_DATA_BIT, 0x5, 0xe8},
    {"LH", FIELDTYPE_DATA_BIT, 0x6, 0xe8},
    {"SH", FIELDTYPE_DATA_BIT, 0x7, 0xe8},
    {"S1", FIELDTYPE_DATA_BIT, 0x8, 0xe8},
    {"S2", FIELDTYPE_DATA_BIT, 0x9, 0xe8},
    {"S3", FIELDTYPE_DATA_BIT, 0xa, 0xe8},
    {"S4", FIELDTYPE_DATA_BIT, 0xb, 0xe8},
    {"S5", FIELDTYPE_DATA_BIT, 0xc, 0xe8},
    {"S6", FIELDTYPE_DATA_BIT, 0xd, 0xe8},
    {"S7", FIELDTYPE_DATA_BIT, 0xe, 0xe8},
    {"S8", FIELDTYPE_DATA_BIT, 0xf, 0xe8},
    {"TotalPieces", FIELDTYPE_DATA_BYTE, 0x0, 0xec},
    {"mDT", FIELDTYPE_DATA_BIT, 0x0, 0xf0},
    {"mNU", FIELDTYPE_DATA_BIT, 0x1, 0xf0},
    {"mWL", FIELDTYPE_DATA_BIT, 0x2, 0xf0},
    {"mGH", FIELDTYPE_DATA_BIT, 0x3, 0xf0},
    {"mA1", FIELDTYPE_DATA_BIT, 0x4, 0xf0},
    {"mA2", FIELDTYPE_DATA_BIT, 0x5, 0xf0},
    {"mBL", FIELDTYPE_DATA_BIT, 0x6, 0xf0},
    {"mSC", FIELDTYPE_DATA_BIT, 0x7, 0xf0},
    {"mS1", FIELDTYPE_DATA_BIT, 0x8, 0xf0},
    {"mS2", FIELDTYPE_DATA_BIT, 0x9, 0xf0},
    {"mS3", FIELDTYPE_DATA_BIT, 0xa, 0xf0},
    {"mS4", FIELDTYPE_DATA_BIT, 0xb, 0xf0},
    {"mDD", FIELDTYPE_DATA_BIT, 0xc, 0xf0},
    {"mKB", FIELDTYPE_DATA_BIT, 0xd, 0xf0},
    {"mSQ", FIELDTYPE_DATA_BIT, 0xe, 0xf0},
    {"mRN", FIELDTYPE_DATA_BIT, 0xf, 0xf0},
    {"dDT", FIELDTYPE_DATA_BYTE, 0x0, 0xf4},
    {"dNU", FIELDTYPE_DATA_BYTE, 0x0, 0xf5},
    {"dWL", FIELDTYPE_DATA_BYTE, 0x0, 0xf6},
    {"dGH", FIELDTYPE_DATA_BYTE, 0x0, 0xf7},
    {"dA1", FIELDTYPE_DATA_BYTE, 0x0, 0xf8},
    {"dA2", FIELDTYPE_DATA_BYTE, 0x0, 0xf9},
    {"dBL", FIELDTYPE_DATA_BYTE, 0x0, 0xfa},
    {"dSC", FIELDTYPE_DATA_BYTE, 0x0, 0xfb},
    {"dS1", FIELDTYPE_DATA_BYTE, 0x0, 0xfc},
    {"dS2", FIELDTYPE_DATA_BYTE, 0x0, 0xfd},
    {"dS3", FIELDTYPE_DATA_BYTE, 0x0, 0xfe},
    {"dS4", FIELDTYPE_DATA_BYTE, 0x0, 0xff},
    {"dDD", FIELDTYPE_DATA_BYTE, 0x0, 0x100},
    {"dKB", FIELDTYPE_DATA_BYTE, 0x0, 0x101},
    {"dSQ", FIELDTYPE_DATA_BYTE, 0x0, 0x102},
    {"dRN", FIELDTYPE_DATA_BYTE, 0x0, 0x103},
    {"A1mv", FIELDTYPE_DATA_BIT, 0x4, 0x104},
    {"A2mv", FIELDTYPE_DATA_BIT, 0x5, 0x104},
    {"SCmv", FIELDTYPE_DATA_BIT, 0x7, 0x104},
    {"S1mv", FIELDTYPE_DATA_BIT, 0x8, 0x104},
    {"S2mv", FIELDTYPE_DATA_BIT, 0x9, 0x104},
    {"S3mv", FIELDTYPE_DATA_BIT, 0xa, 0x104},
    {"S4mv", FIELDTYPE_DATA_BIT, 0xb, 0x104},
    {"InfernoLen", FIELDTYPE_DATA_BYTE, 0x0, 0x108},
    {"InfernoAnim", FIELDTYPE_DATA_BYTE, 0x0, 0x109},
    {"InfernoRollback", FIELDTYPE_DATA_BYTE, 0x0, 0x10a},
    {"ResurrectMode", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x10b},
    {"ResurrectSkill", FIELDTYPE_NAME_TO_WORD, 0x0, 0x10c},
    {"htTop", FIELDTYPE_DATA_WORD, 0x0, 0x10e},
    {"htLeft", FIELDTYPE_DATA_WORD, 0x0, 0x110},
    {"htWidth", FIELDTYPE_DATA_WORD, 0x0, 0x112},
    {"htHeight", FIELDTYPE_DATA_WORD, 0x0, 0x114},
    {"automapCel", FIELDTYPE_DATA_DWORD, 0x0, 0x118},
    {"localBlood", FIELDTYPE_DATA_BYTE, 0x0, 0x11c},
    {"bleed", FIELDTYPE_DATA_BYTE, 0x0, 0x11d},
    {"light", FIELDTYPE_DATA_BYTE, 0x0, 0x11e},
    {"light-r", FIELDTYPE_DATA_BYTE, 0x0, 0x11f},
    {"light-g", FIELDTYPE_DATA_BYTE, 0x0, 0x120},
    {"light-b", FIELDTYPE_DATA_BYTE, 0x0, 0x121},
    {"Utrans", FIELDTYPE_DATA_BYTE, 0x0, 0x122},
    {"Utrans(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x123},
    {"Utrans(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x124},
    {"Heart", FIELDTYPE_DATA_RAW, 0x0, 0x128},
    {"BodyPart", FIELDTYPE_DATA_RAW, 0x0, 0x12c},
    {"restore", FIELDTYPE_DATA_BYTE, 0x0, 0x130},
    {"end", FIELDTYPE_END, 0x0, 0x134},
};
static BinField itemstatcostTable[] = {
    {"stat", FIELDTYPE_NAME_TO_INDEX, 0x0, 0x0},
    {"send other", FIELDTYPE_DATA_BIT, 0x0, 0x4},
    {"signed", FIELDTYPE_DATA_BIT, 0x1, 0x4},
    {"damagerelated", FIELDTYPE_DATA_BIT, 0x2, 0x4},
    {"itemspecific", FIELDTYPE_DATA_BIT, 0x3, 0x4},
    {"direct", FIELDTYPE_DATA_BIT, 0x4, 0x4},
    {"updateanimrate", FIELDTYPE_DATA_BIT, 0x9, 0x4},
    {"fmin", FIELDTYPE_DATA_BIT, 0xa, 0x4},
    {"fcallback", FIELDTYPE_DATA_BIT, 0xb, 0x4},
    {"saved", FIELDTYPE_DATA_BIT, 0xc, 0x4},
    {"csvsigned", FIELDTYPE_DATA_BIT, 0xd, 0x4},
    {"send bits", FIELDTYPE_DATA_BYTE, 0x0, 0x8},
    {"send param bits", FIELDTYPE_DATA_BYTE, 0x0, 0x9},
    {"csvbits", FIELDTYPE_DATA_BYTE, 0x0, 0xa},
    {"csvparam", FIELDTYPE_DATA_BYTE, 0x0, 0xb},
    {"divide", FIELDTYPE_DATA_DWORD, 0x0, 0xc},
    {"multiply", FIELDTYPE_DATA_DWORD_2, 0x0, 0x10},
    {"add", FIELDTYPE_DATA_DWORD, 0x0, 0x14},
    {"valshift", FIELDTYPE_DATA_BYTE, 0x0, 0x18},
    {"save bits", FIELDTYPE_DATA_BYTE, 0x0, 0x19},
    {"1.09-save bits", FIELDTYPE_DATA_BYTE, 0x0, 0x1a},
    {"save add", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1c},
    {"1.09-save add", FIELDTYPE_DATA_DWORD_2, 0x0, 0x20},
    {"save param bits", FIELDTYPE_DATA_DWORD, 0x0, 0x24},
    {"minaccr", FIELDTYPE_DATA_DWORD, 0x0, 0x2c},
    {"encode", FIELDTYPE_DATA_BYTE, 0x0, 0x30},
    {"maxstat", FIELDTYPE_NAME_TO_WORD, 0x0, 0x32},
    {"descpriority", FIELDTYPE_DATA_WORD, 0x0, 0x34},
    {"descfunc", FIELDTYPE_DATA_BYTE, 0x0, 0x36},
    {"descval", FIELDTYPE_DATA_BYTE, 0x0, 0x37},
    {"descstrpos", FIELDTYPE_KEY_TO_WORD, 0x0, 0x38},
    {"descstrneg", FIELDTYPE_KEY_TO_WORD, 0x0, 0x3a},
    {"descstr2", FIELDTYPE_KEY_TO_WORD, 0x0, 0x3c},
    {"dgrp", FIELDTYPE_DATA_WORD, 0x0, 0x3e},
    {"dgrpfunc", FIELDTYPE_DATA_BYTE, 0x0, 0x40},
    {"dgrpval", FIELDTYPE_DATA_BYTE, 0x0, 0x41},
    {"dgrpstrpos", FIELDTYPE_KEY_TO_WORD, 0x0, 0x42},
    {"dgrpstrneg", FIELDTYPE_KEY_TO_WORD, 0x0, 0x44},
    {"dgrpstr2", FIELDTYPE_KEY_TO_WORD, 0x0, 0x46},
    {"itemevent1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x48},
    {"itemevent2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x4a},
    {"itemeventfunc1", FIELDTYPE_DATA_WORD, 0x0, 0x4c},
    {"itemeventfunc2", FIELDTYPE_DATA_WORD, 0x0, 0x4e},
    {"keepzero", FIELDTYPE_DATA_BYTE, 0x0, 0x50},
    {"op", FIELDTYPE_DATA_BYTE, 0x0, 0x54},
    {"op param", FIELDTYPE_DATA_BYTE, 0x0, 0x55},
    {"op base", FIELDTYPE_NAME_TO_WORD, 0x0, 0x56},
    {"op stat1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x58},
    {"op stat2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x5a},
    {"op stat3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x5c},
    {"stuff", FIELDTYPE_DATA_DWORD, 0x0, 0x140},
    {"end", FIELDTYPE_END, 0x0, 0x144},
};
static BinField levelsTable[] = {
    {"Id", FIELDTYPE_DATA_BYTE, 0x0, 0x0},
    {"Pal", FIELDTYPE_DATA_BYTE, 0x0, 0x2},
    {"Act", FIELDTYPE_DATA_BYTE, 0x0, 0x3},
    {"Teleport", FIELDTYPE_DATA_BYTE, 0x0, 0x4},
    {"Rain", FIELDTYPE_DATA_BYTE, 0x0, 0x5},
    {"Mud", FIELDTYPE_DATA_BYTE, 0x0, 0x6},
    {"NoPer", FIELDTYPE_DATA_BYTE, 0x0, 0x7},
    {"IsInside", FIELDTYPE_DATA_BYTE, 0x0, 0x8},
    {"DrawEdges", FIELDTYPE_DATA_BYTE, 0x0, 0x9},
    {"WarpDist", FIELDTYPE_DATA_DWORD, 0x0, 0xc},
    {"MonLvl1", FIELDTYPE_DATA_WORD, 0x0, 0x10},
    {"MonLvl2", FIELDTYPE_DATA_WORD, 0x0, 0x12},
    {"MonLvl3", FIELDTYPE_DATA_WORD, 0x0, 0x14},
    {"MonLvl1Ex", FIELDTYPE_DATA_WORD, 0x0, 0x16},
    {"MonLvl2Ex", FIELDTYPE_DATA_WORD, 0x0, 0x18},
    {"MonLvl3Ex", FIELDTYPE_DATA_WORD, 0x0, 0x1a},
    {"MonDen", FIELDTYPE_DATA_DWORD, 0x0, 0x1c},
    {"MonDen(N)", FIELDTYPE_DATA_DWORD, 0x0, 0x20},
    {"MonDen(H)", FIELDTYPE_DATA_DWORD, 0x0, 0x24},
    {"MonUMin", FIELDTYPE_DATA_BYTE, 0x0, 0x28},
    {"MonUMin(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x29},
    {"MonUMin(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x2a},
    {"MonUMax", FIELDTYPE_DATA_BYTE, 0x0, 0x2b},
    {"MonUMax(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x2c},
    {"MonUMax(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x2d},
    {"MonWndr", FIELDTYPE_DATA_BYTE, 0x0, 0x2e},
    {"MonSpcWalk", FIELDTYPE_DATA_BYTE, 0x0, 0x2f},
    {"Quest", FIELDTYPE_DATA_BYTE, 0x0, 0x30},
    {"rangedspawn", FIELDTYPE_DATA_BYTE, 0x0, 0x31},
    {"NumMon", FIELDTYPE_DATA_BYTE, 0x0, 0x32},
    {"mon1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x36},
    {"mon2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x38},
    {"mon3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x3a},
    {"mon4", FIELDTYPE_NAME_TO_WORD, 0x0, 0x3c},
    {"mon5", FIELDTYPE_NAME_TO_WORD, 0x0, 0x3e},
    {"mon6", FIELDTYPE_NAME_TO_WORD, 0x0, 0x40},
    {"mon7", FIELDTYPE_NAME_TO_WORD, 0x0, 0x42},
    {"mon8", FIELDTYPE_NAME_TO_WORD, 0x0, 0x44},
    {"mon9", FIELDTYPE_NAME_TO_WORD, 0x0, 0x46},
    {"mon10", FIELDTYPE_NAME_TO_WORD, 0x0, 0x48},
    {"mon11", FIELDTYPE_NAME_TO_WORD, 0x0, 0x4a},
    {"mon12", FIELDTYPE_NAME_TO_WORD, 0x0, 0x4c},
    {"mon13", FIELDTYPE_NAME_TO_WORD, 0x0, 0x4e},
    {"mon14", FIELDTYPE_NAME_TO_WORD, 0x0, 0x50},
    {"mon15", FIELDTYPE_NAME_TO_WORD, 0x0, 0x52},
    {"mon16", FIELDTYPE_NAME_TO_WORD, 0x0, 0x54},
    {"mon17", FIELDTYPE_NAME_TO_WORD, 0x0, 0x56},
    {"mon18", FIELDTYPE_NAME_TO_WORD, 0x0, 0x58},
    {"mon19", FIELDTYPE_NAME_TO_WORD, 0x0, 0x5a},
    {"mon20", FIELDTYPE_NAME_TO_WORD, 0x0, 0x5c},
    {"mon21", FIELDTYPE_NAME_TO_WORD, 0x0, 0x5e},
    {"mon22", FIELDTYPE_NAME_TO_WORD, 0x0, 0x60},
    {"mon23", FIELDTYPE_NAME_TO_WORD, 0x0, 0x62},
    {"mon24", FIELDTYPE_NAME_TO_WORD, 0x0, 0x64},
    {"mon25", FIELDTYPE_NAME_TO_WORD, 0x0, 0x66},
    {"nmon1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x68},
    {"nmon2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x6a},
    {"nmon3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x6c},
    {"nmon4", FIELDTYPE_NAME_TO_WORD, 0x0, 0x6e},
    {"nmon5", FIELDTYPE_NAME_TO_WORD, 0x0, 0x70},
    {"nmon6", FIELDTYPE_NAME_TO_WORD, 0x0, 0x72},
    {"nmon7", FIELDTYPE_NAME_TO_WORD, 0x0, 0x74},
    {"nmon8", FIELDTYPE_NAME_TO_WORD, 0x0, 0x76},
    {"nmon9", FIELDTYPE_NAME_TO_WORD, 0x0, 0x78},
    {"nmon10", FIELDTYPE_NAME_TO_WORD, 0x0, 0x7a},
    {"nmon11", FIELDTYPE_NAME_TO_WORD, 0x0, 0x7c},
    {"nmon12", FIELDTYPE_NAME_TO_WORD, 0x0, 0x7e},
    {"nmon13", FIELDTYPE_NAME_TO_WORD, 0x0, 0x80},
    {"nmon14", FIELDTYPE_NAME_TO_WORD, 0x0, 0x82},
    {"nmon15", FIELDTYPE_NAME_TO_WORD, 0x0, 0x84},
    {"nmon16", FIELDTYPE_NAME_TO_WORD, 0x0, 0x86},
    {"nmon17", FIELDTYPE_NAME_TO_WORD, 0x0, 0x88},
    {"nmon18", FIELDTYPE_NAME_TO_WORD, 0x0, 0x8a},
    {"nmon19", FIELDTYPE_NAME_TO_WORD, 0x0, 0x8c},
    {"nmon20", FIELDTYPE_NAME_TO_WORD, 0x0, 0x8e},
    {"nmon21", FIELDTYPE_NAME_TO_WORD, 0x0, 0x90},
    {"nmon22", FIELDTYPE_NAME_TO_WORD, 0x0, 0x92},
    {"nmon23", FIELDTYPE_NAME_TO_WORD, 0x0, 0x94},
    {"nmon24", FIELDTYPE_NAME_TO_WORD, 0x0, 0x96},
    {"nmon25", FIELDTYPE_NAME_TO_WORD, 0x0, 0x98},
    {"umon1", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9a},
    {"umon2", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9c},
    {"umon3", FIELDTYPE_NAME_TO_WORD, 0x0, 0x9e},
    {"umon4", FIELDTYPE_NAME_TO_WORD, 0x0, 0xa0},
    {"umon5", FIELDTYPE_NAME_TO_WORD, 0x0, 0xa2},
    {"umon6", FIELDTYPE_NAME_TO_WORD, 0x0, 0xa4},
    {"umon7", FIELDTYPE_NAME_TO_WORD, 0x0, 0xa6},
    {"umon8", FIELDTYPE_NAME_TO_WORD, 0x0, 0xa8},
    {"umon9", FIELDTYPE_NAME_TO_WORD, 0x0, 0xaa},
    {"umon10", FIELDTYPE_NAME_TO_WORD, 0x0, 0xac},
    {"umon11", FIELDTYPE_NAME_TO_WORD, 0x0, 0xae},
    {"umon12", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb0},
    {"umon13", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb2},
    {"umon14", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb4},
    {"umon15", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb6},
    {"umon16", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb8},
    {"umon17", FIELDTYPE_NAME_TO_WORD, 0x0, 0xba},
    {"umon18", FIELDTYPE_NAME_TO_WORD, 0x0, 0xbc},
    {"umon19", FIELDTYPE_NAME_TO_WORD, 0x0, 0xbe},
    {"umon20", FIELDTYPE_NAME_TO_WORD, 0x0, 0xc0},
    {"umon21", FIELDTYPE_NAME_TO_WORD, 0x0, 0xc2},
    {"umon22", FIELDTYPE_NAME_TO_WORD, 0x0, 0xc4},
    {"umon23", FIELDTYPE_NAME_TO_WORD, 0x0, 0xc6},
    {"umon24", FIELDTYPE_NAME_TO_WORD, 0x0, 0xc8},
    {"umon25", FIELDTYPE_NAME_TO_WORD, 0x0, 0xca},
    {"cmon1", FIELDTYPE_NAME_TO_WORD, 0x0, 0xcc},
    {"cmon2", FIELDTYPE_NAME_TO_WORD, 0x0, 0xce},
    {"cmon3", FIELDTYPE_NAME_TO_WORD, 0x0, 0xd0},
    {"cmon4", FIELDTYPE_NAME_TO_WORD, 0x0, 0xd2},
    {"cpct1", FIELDTYPE_DATA_WORD, 0x0, 0xd4},
    {"cpct2", FIELDTYPE_DATA_WORD, 0x0, 0xd6},
    {"cpct3", FIELDTYPE_DATA_WORD, 0x0, 0xd8},
    {"cpct4", FIELDTYPE_DATA_WORD, 0x0, 0xda},
    {"camt1", FIELDTYPE_DATA_WORD, 0x0, 0xdc},
    {"camt2", FIELDTYPE_DATA_WORD, 0x0, 0xdc},
    {"camt3", FIELDTYPE_DATA_WORD, 0x0, 0xdc},
    {"camt4", FIELDTYPE_DATA_WORD, 0x0, 0xdc},
    {"Waypoint", FIELDTYPE_DATA_BYTE, 0x0, 0xe4},
    {"ObjGrp0", FIELDTYPE_DATA_BYTE, 0x0, 0xe5},
    {"ObjGrp1", FIELDTYPE_DATA_BYTE, 0x0, 0xe6},
    {"ObjGrp2", FIELDTYPE_DATA_BYTE, 0x0, 0xe7},
    {"ObjGrp3", FIELDTYPE_DATA_BYTE, 0x0, 0xe8},
    {"ObjGrp4", FIELDTYPE_DATA_BYTE, 0x0, 0xe9},
    {"ObjGrp5", FIELDTYPE_DATA_BYTE, 0x0, 0xea},
    {"ObjGrp6", FIELDTYPE_DATA_BYTE, 0x0, 0xeb},
    {"ObjGrp7", FIELDTYPE_DATA_BYTE, 0x0, 0xec},
    {"ObjPrb0", FIELDTYPE_DATA_BYTE, 0x0, 0xed},
    {"ObjPrb1", FIELDTYPE_DATA_BYTE, 0x0, 0xee},
    {"ObjPrb2", FIELDTYPE_DATA_BYTE, 0x0, 0xef},
    {"ObjPrb3", FIELDTYPE_DATA_BYTE, 0x0, 0xf0},
    {"ObjPrb4", FIELDTYPE_DATA_BYTE, 0x0, 0xf1},
    {"ObjPrb5", FIELDTYPE_DATA_BYTE, 0x0, 0xf2},
    {"ObjPrb6", FIELDTYPE_DATA_BYTE, 0x0, 0xf3},
    {"ObjPrb7", FIELDTYPE_DATA_BYTE, 0x0, 0xf4},
    {"LevelName", FIELDTYPE_DATA_ASCII, 0x27, 0xf5},
    {"LevelWarp", FIELDTYPE_DATA_ASCII, 0x27, 0x11d},
    {"EntryFile", FIELDTYPE_DATA_ASCII, 0x27, 0x145},
    {"Themes", FIELDTYPE_DATA_DWORD, 0x0, 0x210},
    {"FloorFilter", FIELDTYPE_DATA_DWORD, 0x0, 0x214},
    {"BlankScreen", FIELDTYPE_DATA_DWORD, 0x0, 0x218},
    {"SoundEnv", FIELDTYPE_DATA_BYTE, 0x0, 0x21c},
    {"end", FIELDTYPE_END, 0x0, 0x220},
};
static BinField leveldefsTable[] = {
    {"QuestFlag", FIELDTYPE_DATA_DWORD_2, 0x0, 0x0},
    {"QuestFlagEx", FIELDTYPE_DATA_DWORD_2, 0x0, 0x4},
    {"Layer", FIELDTYPE_DATA_DWORD_2, 0x0, 0x8},
    {"SizeX", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc},
    {"SizeX(N)", FIELDTYPE_DATA_DWORD_2, 0x0, 0x10},
    {"SizeX(H)", FIELDTYPE_DATA_DWORD_2, 0x0, 0x14},
    {"SizeY", FIELDTYPE_DATA_DWORD_2, 0x0, 0x18},
    {"SizeY(N)", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1c},
    {"SizeY(H)", FIELDTYPE_DATA_DWORD_2, 0x0, 0x20},
    {"OffsetX", FIELDTYPE_DATA_DWORD_2, 0x0, 0x24},
    {"OffsetY", FIELDTYPE_DATA_DWORD_2, 0x0, 0x28},
    {"Depend", FIELDTYPE_DATA_DWORD_2, 0x0, 0x2c},
    {"DrlgType", FIELDTYPE_DATA_DWORD_2, 0x0, 0x30},
    {"LevelType", FIELDTYPE_DATA_DWORD_2, 0x0, 0x34},
    {"SubType", FIELDTYPE_DATA_DWORD_2, 0x0, 0x38},
    {"SubTheme", FIELDTYPE_DATA_DWORD_2, 0x0, 0x3c},
    {"SubWaypoint", FIELDTYPE_DATA_DWORD_2, 0x0, 0x40},
    {"SubShrine", FIELDTYPE_DATA_DWORD_2, 0x0, 0x44},
    {"Vis0", FIELDTYPE_DATA_DWORD_2, 0x0, 0x48},
    {"Vis1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x4c},
    {"Vis2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x50},
    {"Vis3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x54},
    {"Vis4", FIELDTYPE_DATA_DWORD_2, 0x0, 0x58},
    {"Vis5", FIELDTYPE_DATA_DWORD_2, 0x0, 0x5c},
    {"Vis6", FIELDTYPE_DATA_DWORD_2, 0x0, 0x60},
    {"Vis7", FIELDTYPE_DATA_DWORD_2, 0x0, 0x64},
    {"Warp0", FIELDTYPE_DATA_DWORD_2, 0x0, 0x68},
    {"Warp1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x6c},
    {"Warp2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x70},
    {"Warp3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x74},
    {"Warp4", FIELDTYPE_DATA_DWORD_2, 0x0, 0x78},
    {"Warp5", FIELDTYPE_DATA_DWORD_2, 0x0, 0x7c},
    {"Warp6", FIELDTYPE_DATA_DWORD_2, 0x0, 0x80},
    {"Warp7", FIELDTYPE_DATA_DWORD_2, 0x0, 0x84},
    {"Intensity", FIELDTYPE_DATA_BYTE, 0x0, 0x88}, // WRONG
    {"Red", FIELDTYPE_DATA_BYTE, 0x0, 0x89},
    {"Green", FIELDTYPE_DATA_BYTE, 0x0, 0x8a},
    {"Blue", FIELDTYPE_DATA_BYTE, 0x0, 0x8b},
    {"Portal", FIELDTYPE_DATA_DWORD_2, 0x0, 0x8c},
    {"Position", FIELDTYPE_DATA_DWORD_2, 0x0, 0x90},
    {"SaveMonsters", FIELDTYPE_DATA_DWORD_2, 0x0, 0x94},
    {"LOSDraw", FIELDTYPE_DATA_DWORD_2, 0x0, 0x98},
    {"end", FIELDTYPE_END, 0x0, 0x9c},
};
static BinField lvlmazeTable[] = {
    {"Level", FIELDTYPE_DATA_DWORD, 0x0, 0x0},    {"Rooms", FIELDTYPE_DATA_DWORD, 0x0, 0x4},  {"Rooms(N)", FIELDTYPE_DATA_DWORD, 0x0, 0x8},
    {"Rooms(H)", FIELDTYPE_DATA_DWORD, 0x0, 0xc}, {"SizeX", FIELDTYPE_DATA_DWORD, 0x0, 0x10}, {"SizeY", FIELDTYPE_DATA_DWORD, 0x0, 0x14},
    {"Merge", FIELDTYPE_DATA_DWORD, 0x0, 0x18},   {"end", FIELDTYPE_END, 0x0, 0x1c},
};
static BinField lvlsubTable[] = {
    {"Type", FIELDTYPE_DATA_DWORD, 0x0, 0x0},
    {"File", FIELDTYPE_DATA_ASCII, 0x3b, 0x4},
    {"CheckAll", FIELDTYPE_DATA_DWORD_2, 0x0, 0x40},
    {"BordType", FIELDTYPE_DATA_DWORD_2, 0x0, 0x44},
    {"Dt1Mask", FIELDTYPE_DATA_DWORD, 0x0, 0x48},
    {"GridSize", FIELDTYPE_DATA_DWORD, 0x0, 0x4c},
    {"Prob0", FIELDTYPE_DATA_DWORD, 0x0, 0x11c},
    {"Prob1", FIELDTYPE_DATA_DWORD, 0x0, 0x120},
    {"Prob2", FIELDTYPE_DATA_DWORD, 0x0, 0x124},
    {"Prob3", FIELDTYPE_DATA_DWORD, 0x0, 0x128},
    {"Prob4", FIELDTYPE_DATA_DWORD, 0x0, 0x12c},
    {"Trials0", FIELDTYPE_DATA_DWORD_2, 0x0, 0x130},
    {"Trials1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x134},
    {"Trials2", FIELDTYPE_DATA_DWORD_2, 0x0, 0x138},
    {"Trials3", FIELDTYPE_DATA_DWORD_2, 0x0, 0x13c},
    {"Trials4", FIELDTYPE_DATA_DWORD_2, 0x0, 0x140},
    {"Max0", FIELDTYPE_DATA_DWORD, 0x0, 0x144},
    {"Max1", FIELDTYPE_DATA_DWORD, 0x0, 0x148},
    {"Max2", FIELDTYPE_DATA_DWORD, 0x0, 0x14c},
    {"Max3", FIELDTYPE_DATA_DWORD, 0x0, 0x150},
    {"Max4", FIELDTYPE_DATA_DWORD, 0x0, 0x154},
    {"Expansion", FIELDTYPE_DATA_DWORD, 0x0, 0x158},
    {"end", FIELDTYPE_END, 0x0, 0x15c},
};
static BinField lvlwarpTable[] = {
    {"Id", FIELDTYPE_DATA_DWORD_2, 0x0, 0x0},
    {"SelectX", FIELDTYPE_DATA_DWORD_2, 0x0, 0x4},
    {"SelectY", FIELDTYPE_DATA_DWORD_2, 0x0, 0x8},
    {"SelectDX", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc},
    {"SelectDY", FIELDTYPE_DATA_DWORD_2, 0x0, 0x10},
    {"ExitWalkX", FIELDTYPE_DATA_DWORD_2, 0x0, 0x14},
    {"ExitWalkY", FIELDTYPE_DATA_DWORD_2, 0x0, 0x18},
    {"OffsetX", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1c},
    {"OffsetY", FIELDTYPE_DATA_DWORD_2, 0x0, 0x20},
    {"LitVersion", FIELDTYPE_DATA_DWORD_2, 0x0, 0x24},
    {"Tiles", FIELDTYPE_DATA_DWORD_2, 0x0, 0x28},
    {"Direction", FIELDTYPE_DATA_ASCII, 0x1, 0x2c},
    {"end", FIELDTYPE_END, 0x0, 0x30},
};
static BinField lvlprestTable[] = {
    {"Def", FIELDTYPE_DATA_DWORD, 0x0, 0x0},       {"LevelId", FIELDTYPE_DATA_DWORD, 0x0, 0x4},     {"Populate", FIELDTYPE_DATA_DWORD, 0x0, 0x8},
    {"Logicals", FIELDTYPE_DATA_DWORD, 0x0, 0xc},  {"Outdoors", FIELDTYPE_DATA_DWORD, 0x0, 0x10},   {"Animate", FIELDTYPE_DATA_DWORD, 0x0, 0x14},
    {"KillEdge", FIELDTYPE_DATA_DWORD, 0x0, 0x18}, {"FillBlanks", FIELDTYPE_DATA_DWORD, 0x0, 0x1c}, {"Expansion", FIELDTYPE_DATA_DWORD, 0x0, 0x20},
    {"SizeX", FIELDTYPE_DATA_DWORD, 0x0, 0x28},    {"SizeY", FIELDTYPE_DATA_DWORD, 0x0, 0x2c},      {"AutoMap", FIELDTYPE_DATA_DWORD, 0x0, 0x30},
    {"Scan", FIELDTYPE_DATA_DWORD, 0x0, 0x34},     {"Pops", FIELDTYPE_DATA_DWORD_2, 0x0, 0x38},     {"PopPad", FIELDTYPE_DATA_DWORD_2, 0x0, 0x3c},
    {"Files", FIELDTYPE_DATA_DWORD, 0x0, 0x40},    {"File1", FIELDTYPE_DATA_ASCII, 0x3b, 0x44},     {"File2", FIELDTYPE_DATA_ASCII, 0x3b, 0x80},
    {"File3", FIELDTYPE_DATA_ASCII, 0x3b, 0xbc},   {"File4", FIELDTYPE_DATA_ASCII, 0x3b, 0xf8},     {"File5", FIELDTYPE_DATA_ASCII, 0x3b, 0x134},
    {"File6", FIELDTYPE_DATA_ASCII, 0x3b, 0x170},  {"Dt1Mask", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1ac}, {"end", FIELDTYPE_END, 0x0, 0x1b0},
};
static BinField lvltypesTable[] = {
    {"File 1", FIELDTYPE_DATA_ASCII, 0x3b, 0x0},
    {"File 2", FIELDTYPE_DATA_ASCII, 0x3b, 0x3c},
    {"File 3", FIELDTYPE_DATA_ASCII, 0x3b, 0x78},
    {"File 4", FIELDTYPE_DATA_ASCII, 0x3b, 0xb4},
    {"File 5", FIELDTYPE_DATA_ASCII, 0x3b, 0xf0},
    {"File 6", FIELDTYPE_DATA_ASCII, 0x3b, 0x12c},
    {"File 7", FIELDTYPE_DATA_ASCII, 0x3b, 0x168},
    {"File 8", FIELDTYPE_DATA_ASCII, 0x3b, 0x1a4},
    {"File 9", FIELDTYPE_DATA_ASCII, 0x3b, 0x1e0},
    {"File 10", FIELDTYPE_DATA_ASCII, 0x3b, 0x21c},
    {"File 11", FIELDTYPE_DATA_ASCII, 0x3b, 0x258},
    {"File 12", FIELDTYPE_DATA_ASCII, 0x3b, 0x294},
    {"File 13", FIELDTYPE_DATA_ASCII, 0x3b, 0x2d0},
    {"File 14", FIELDTYPE_DATA_ASCII, 0x3b, 0x30c},
    {"File 15", FIELDTYPE_DATA_ASCII, 0x3b, 0x348},
    {"File 16", FIELDTYPE_DATA_ASCII, 0x3b, 0x384},
    {"File 17", FIELDTYPE_DATA_ASCII, 0x3b, 0x3c0},
    {"File 18", FIELDTYPE_DATA_ASCII, 0x3b, 0x3fc},
    {"File 19", FIELDTYPE_DATA_ASCII, 0x3b, 0x438},
    {"File 20", FIELDTYPE_DATA_ASCII, 0x3b, 0x474},
    {"File 21", FIELDTYPE_DATA_ASCII, 0x3b, 0x4b0},
    {"File 22", FIELDTYPE_DATA_ASCII, 0x3b, 0x4ec},
    {"File 23", FIELDTYPE_DATA_ASCII, 0x3b, 0x528},
    {"File 24", FIELDTYPE_DATA_ASCII, 0x3b, 0x564},
    {"File 25", FIELDTYPE_DATA_ASCII, 0x3b, 0x5a0},
    {"File 26", FIELDTYPE_DATA_ASCII, 0x3b, 0x5dc},
    {"File 27", FIELDTYPE_DATA_ASCII, 0x3b, 0x618},
    {"File 28", FIELDTYPE_DATA_ASCII, 0x3b, 0x654},
    {"File 29", FIELDTYPE_DATA_ASCII, 0x3b, 0x690},
    {"File 30", FIELDTYPE_DATA_ASCII, 0x3b, 0x6cc},
    {"File 31", FIELDTYPE_DATA_ASCII, 0x3b, 0x708},
    {"File 32", FIELDTYPE_DATA_ASCII, 0x3b, 0x744},
    {"Act", FIELDTYPE_DATA_BYTE, 0x0, 0x780},
    {"Expansion", FIELDTYPE_DATA_DWORD, 0x0, 0x784},
    {"end", FIELDTYPE_END, 0x0, 0x788},
};
static BinField charstatsTable[] = {
    {"wclass", FIELDTYPE_DATA_ASCII, 0x20, 0x00},
    {"class", FIELDTYPE_DATA_ASCII, 0xf, 0x20},
    {"str", FIELDTYPE_DATA_BYTE, 0x0, 0x30},
    {"dex", FIELDTYPE_DATA_BYTE, 0x0, 0x31},
    {"int", FIELDTYPE_DATA_BYTE, 0x0, 0x32},
    {"vit", FIELDTYPE_DATA_BYTE, 0x0, 0x33},
    {"stamina", FIELDTYPE_DATA_BYTE, 0x0, 0x34},
    {"hpadd", FIELDTYPE_DATA_BYTE, 0x0, 0x35},
    {"PercentStr", FIELDTYPE_DATA_BYTE, 0x0, 0x36},
    {"PercentInt", FIELDTYPE_DATA_BYTE, 0x0, 0x37},
    {"PercentDex", FIELDTYPE_DATA_BYTE, 0x0, 0x38},
    {"PercentVit", FIELDTYPE_DATA_BYTE, 0x0, 0x39},
    {"ManaRegen", FIELDTYPE_DATA_BYTE, 0x0, 0x3a},
    {"ToHitFactor", FIELDTYPE_DATA_DWORD_2, 0x0, 0x3c},
    {"WalkVelocity", FIELDTYPE_DATA_BYTE, 0x0, 0x40},
    {"RunVelocity", FIELDTYPE_DATA_BYTE, 0x0, 0x41},
    {"RunDrain", FIELDTYPE_DATA_BYTE, 0x0, 0x42},
    {"LifePerLevel", FIELDTYPE_DATA_BYTE, 0x0, 0x43},
    {"StaminaPerLevel", FIELDTYPE_DATA_BYTE, 0x0, 0x44},
    {"ManaPerLevel", FIELDTYPE_DATA_BYTE, 0x0, 0x45},
    {"LifePerVitality", FIELDTYPE_DATA_BYTE, 0x0, 0x46},
    {"StaminaPerVitality", FIELDTYPE_DATA_BYTE, 0x0, 0x47},
    {"ManaPerMagic", FIELDTYPE_DATA_BYTE, 0x0, 0x48},
    {"BlockFactor", FIELDTYPE_DATA_BYTE, 0x0, 0x49},
    {"basewclass", FIELDTYPE_DATA_RAW, 0x0, 0x4c},
    {"StatPerLevel", FIELDTYPE_DATA_BYTE, 0x0, 0x50},
    {"StrAllSkills", FIELDTYPE_KEY_TO_WORD, 0x0, 0x52},
    {"StrSkillTab1", FIELDTYPE_KEY_TO_WORD, 0x0, 0x54},
    {"StrSkillTab2", FIELDTYPE_KEY_TO_WORD, 0x0, 0x56},
    {"StrSkillTab3", FIELDTYPE_KEY_TO_WORD, 0x0, 0x58},
    {"StrClassOnly", FIELDTYPE_KEY_TO_WORD, 0x0, 0x5a},
    {"item1", FIELDTYPE_DATA_RAW, 0x0, 0x5c},
    {"item1loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x60},
    {"item1count", FIELDTYPE_DATA_BYTE, 0x0, 0x61},
    {"item2", FIELDTYPE_DATA_RAW, 0x0, 0x64},
    {"item2loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x68},
    {"item2count", FIELDTYPE_DATA_BYTE, 0x0, 0x69},
    {"item3", FIELDTYPE_DATA_RAW, 0x0, 0x6c},
    {"item3loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x70},
    {"item3count", FIELDTYPE_DATA_BYTE, 0x0, 0x71},
    {"item4", FIELDTYPE_DATA_RAW, 0x0, 0x74},
    {"item4loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x78},
    {"item4count", FIELDTYPE_DATA_BYTE, 0x0, 0x79},
    {"item5", FIELDTYPE_DATA_RAW, 0x0, 0x7c},
    {"item5loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x80},
    {"item5count", FIELDTYPE_DATA_BYTE, 0x0, 0x81},
    {"item6", FIELDTYPE_DATA_RAW, 0x0, 0x84},
    {"item6loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x88},
    {"item6count", FIELDTYPE_DATA_BYTE, 0x0, 0x89},
    {"item7", FIELDTYPE_DATA_RAW, 0x0, 0x8c},
    {"item7loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x90},
    {"item7count", FIELDTYPE_DATA_BYTE, 0x0, 0x91},
    {"item8", FIELDTYPE_DATA_RAW, 0x0, 0x94},
    {"item8loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x98},
    {"item8count", FIELDTYPE_DATA_BYTE, 0x0, 0x99},
    {"item9", FIELDTYPE_DATA_RAW, 0x0, 0x9c},
    {"item9loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0xa0},
    {"item9count", FIELDTYPE_DATA_BYTE, 0x0, 0xa1},
    {"item10", FIELDTYPE_DATA_RAW, 0x0, 0xa4},
    {"item10loc", FIELDTYPE_CODE_TO_BYTE, 0x0, 0xa8},
    {"item10count", FIELDTYPE_DATA_BYTE, 0x0, 0xa9},
    {"StartSkill", FIELDTYPE_NAME_TO_WORD, 0x0, 0xac},
    {"Skill 1", FIELDTYPE_NAME_TO_WORD, 0x0, 0xae},
    {"Skill 2", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb0},
    {"Skill 3", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb2},
    {"Skill 4", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb4},
    {"Skill 5", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb6},
    {"Skill 6", FIELDTYPE_NAME_TO_WORD, 0x0, 0xb8},
    {"Skill 7", FIELDTYPE_NAME_TO_WORD, 0x0, 0xba},
    {"Skill 8", FIELDTYPE_NAME_TO_WORD, 0x0, 0xbc},
    {"Skill 9", FIELDTYPE_NAME_TO_WORD, 0x0, 0xbe},
    {"Skill 10", FIELDTYPE_NAME_TO_WORD, 0x0, 0xc0},
    {"end", FIELDTYPE_END, 0x0, 0xc4},
};
static BinField setitemsTable[] = {
    {"index", FIELDTYPE_CODE_TO_WORD, 3, 0},
    {"name", FIELDTYPE_DATA_ASCII, 0x1F, 0x2},
    {"version", FIELDTYPE_DATA_WORD, 0, 0x22},
    {"namestr", FIELDTYPE_DATA_WORD, 0, 0x24},
    {"item", FIELDTYPE_DATA_RAW, 0x0, 0x28},
    {"set", FIELDTYPE_NAME_TO_WORD, 0x0, 0x2c},
    {"lvl", FIELDTYPE_DATA_WORD, 0x0, 0x30},
    {"lvl req", FIELDTYPE_DATA_WORD, 0x0, 0x32},
    {"rarity", FIELDTYPE_DATA_DWORD, 0x0, 0x34},
    {"cost mult", FIELDTYPE_DATA_DWORD_2, 0x0, 0x38},
    {"cost add", FIELDTYPE_DATA_DWORD_2, 0x0, 0x3c},
    {"chrtransform", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x40},
    {"invtransform", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x41},
    {"flippyfile", FIELDTYPE_DATA_ASCII, 0x1f, 0x42},
    {"invfile", FIELDTYPE_DATA_ASCII, 0x1f, 0x62},
    {"dropsound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x82},
    {"usesound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x84},
    {"dropsfxframe", FIELDTYPE_DATA_BYTE, 0x0, 0x86},
    {"add func", FIELDTYPE_DATA_BYTE, 0x0, 0x87},
    {"prop1", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x88},
    {"par1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x8c},
    {"min1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x90},
    {"max1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x94},
    {"prop2", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x98},
    {"par2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x9c},
    {"min2", FIELDTYPE_DATA_DWORD_2, 0x0, 0xa0},
    {"max2", FIELDTYPE_DATA_DWORD_2, 0x0, 0xa4},
    {"prop3", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xa8},
    {"par3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xac},
    {"min3", FIELDTYPE_DATA_DWORD_2, 0x0, 0xb0},
    {"max3", FIELDTYPE_DATA_DWORD_2, 0x0, 0xb4},
    {"prop4", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xb8},
    {"par4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xbc},
    {"min4", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc0},
    {"max4", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc4},
    {"prop5", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xc8},
    {"par5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xcc},
    {"min5", FIELDTYPE_DATA_DWORD_2, 0x0, 0xd0},
    {"max5", FIELDTYPE_DATA_DWORD_2, 0x0, 0xd4},
    {"prop6", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xd8},
    {"par6", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xdc},
    {"min6", FIELDTYPE_DATA_DWORD_2, 0x0, 0xe0},
    {"max6", FIELDTYPE_DATA_DWORD_2, 0x0, 0xe4},
    {"prop7", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xe8},
    {"par7", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xec},
    {"min7", FIELDTYPE_DATA_DWORD_2, 0x0, 0xf0},
    {"max7", FIELDTYPE_DATA_DWORD_2, 0x0, 0xf4},
    {"prop8", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xf8},
    {"par8", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xfc},
    {"min8", FIELDTYPE_DATA_DWORD_2, 0x0, 0x100},
    {"max8", FIELDTYPE_DATA_DWORD_2, 0x0, 0x104},
    {"prop9", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x108},
    {"par9", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x10c},
    {"min9", FIELDTYPE_DATA_DWORD_2, 0x0, 0x110},
    {"max9", FIELDTYPE_DATA_DWORD_2, 0x0, 0x114},
    {"aprop1a", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x118},
    {"apar1a", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x11c},
    {"amin1a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x120},
    {"amax1a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x124},
    {"aprop1b", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x128},
    {"apar1b", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x12c},
    {"amin1b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x130},
    {"amax1b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x134},
    {"aprop2a", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x138},
    {"apar2a", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x13c},
    {"amin2a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x140},
    {"amax2a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x144},
    {"aprop2b", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x148},
    {"apar2b", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x14c},
    {"amin2b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x150},
    {"amax2b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x154},
    {"aprop3a", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x158},
    {"apar3a", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x15c},
    {"amin3a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x160},
    {"amax3a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x164},
    {"aprop3b", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x168},
    {"apar3b", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x16c},
    {"amin3b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x170},
    {"amax3b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x174},
    {"aprop4a", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x178},
    {"apar4a", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x17c},
    {"amin4a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x180},
    {"amax4a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x184},
    {"aprop4b", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x188},
    {"apar4b", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x18c},
    {"amin4b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x190},
    {"amax4b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x194},
    {"aprop5a", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x198},
    {"apar5a", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x19c},
    {"amin5a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1a0},
    {"amax5a", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1a4},
    {"aprop5b", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x1a8},
    {"apar5b", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x1ac},
    {"amin5b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1b0},
    {"amax5b", FIELDTYPE_DATA_DWORD_2, 0x0, 0x1b4},
    {"end", FIELDTYPE_END, 0x0, 0x1b8},
};
static BinField uniqueitemsTable[] = {
    {"index", FIELDTYPE_DATA_WORD, 0, 0x0},
    {"name", FIELDTYPE_DATA_ASCII, 0x1F, 0x2},
    {"namestr", FIELDTYPE_DATA_WORD, 0, 0x22},
    {"version", FIELDTYPE_DATA_WORD, 0x0, 0x24},
    {"code", FIELDTYPE_DATA_RAW, 0x0, 0x28},
    {"enabled", FIELDTYPE_DATA_BIT, 0x0, 0x2c},
    {"nolimit", FIELDTYPE_DATA_BIT, 0x1, 0x2c},
    {"carry1", FIELDTYPE_DATA_BIT, 0x2, 0x2c},
    {"ladder", FIELDTYPE_DATA_BIT, 0x3, 0x2c},
    {"rarity", FIELDTYPE_DATA_WORD, 0x0, 0x30},
    {"lvl", FIELDTYPE_DATA_WORD, 0x0, 0x34},
    {"lvl req", FIELDTYPE_DATA_WORD, 0x0, 0x36},
    {"chrtransform", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x38},
    {"invtransform", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x39},
    {"flippyfile", FIELDTYPE_DATA_ASCII, 0x1f, 0x3a},
    {"invfile", FIELDTYPE_DATA_ASCII, 0x1f, 0x5a},
    {"cost mult", FIELDTYPE_DATA_DWORD_2, 0x0, 0x7c},
    {"cost add", FIELDTYPE_DATA_DWORD_2, 0x0, 0x80},
    {"dropsound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x84},
    {"usesound", FIELDTYPE_NAME_TO_WORD, 0x0, 0x86},
    {"dropsfxframe", FIELDTYPE_DATA_BYTE, 0x0, 0x88},
    {"prop1", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x8c},
    {"par1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x90},
    {"min1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x94},
    {"max1", FIELDTYPE_DATA_DWORD_2, 0x0, 0x98},
    {"prop2", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x9c},
    {"par2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa0},
    {"min2", FIELDTYPE_DATA_DWORD_2, 0x0, 0xa4},
    {"max2", FIELDTYPE_DATA_DWORD_2, 0x0, 0xa8},
    {"prop3", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xac},
    {"par3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb0},
    {"min3", FIELDTYPE_DATA_DWORD_2, 0x0, 0xb4},
    {"max3", FIELDTYPE_DATA_DWORD_2, 0x0, 0xb8},
    {"prop4", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xbc},
    {"par4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xc0},
    {"min4", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc4},
    {"max4", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc8},
    {"prop5", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xcc},
    {"par5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xd0},
    {"min5", FIELDTYPE_DATA_DWORD_2, 0x0, 0xd4},
    {"max5", FIELDTYPE_DATA_DWORD_2, 0x0, 0xd8},
    {"prop6", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xdc},
    {"par6", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xe0},
    {"min6", FIELDTYPE_DATA_DWORD_2, 0x0, 0xe4},
    {"max6", FIELDTYPE_DATA_DWORD_2, 0x0, 0xe8},
    {"prop7", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xec},
    {"par7", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xf0},
    {"min7", FIELDTYPE_DATA_DWORD_2, 0x0, 0xf4},
    {"max7", FIELDTYPE_DATA_DWORD_2, 0x0, 0xf8},
    {"prop8", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xfc},
    {"par8", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x100},
    {"min8", FIELDTYPE_DATA_DWORD_2, 0x0, 0x104},
    {"max8", FIELDTYPE_DATA_DWORD_2, 0x0, 0x108},
    {"prop9", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x10c},
    {"par9", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x110},
    {"min9", FIELDTYPE_DATA_DWORD_2, 0x0, 0x114},
    {"max9", FIELDTYPE_DATA_DWORD_2, 0x0, 0x118},
    {"prop10", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x11c},
    {"par10", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x120},
    {"min10", FIELDTYPE_DATA_DWORD_2, 0x0, 0x124},
    {"max10", FIELDTYPE_DATA_DWORD_2, 0x0, 0x128},
    {"prop11", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x12c},
    {"par11", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x130},
    {"min11", FIELDTYPE_DATA_DWORD_2, 0x0, 0x134},
    {"max11", FIELDTYPE_DATA_DWORD_2, 0x0, 0x138},
    {"prop12", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x13c},
    {"par12", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x140},
    {"min12", FIELDTYPE_DATA_DWORD_2, 0x0, 0x144},
    {"max12", FIELDTYPE_DATA_DWORD_2, 0x0, 0x148},
    {"end", FIELDTYPE_END, 0x0, 0x14c},
};
static BinField setsTable[] = {
    {"index", FIELDTYPE_NAME_TO_INDEX, 0x0, 0x0},     {"name", FIELDTYPE_KEY_TO_WORD, 0x0, 0x2},
    {"version", FIELDTYPE_DATA_WORD, 0x0, 0x4},       {"pcode2a", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x10},
    {"pparam2a", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x14}, {"pmin2a", FIELDTYPE_DATA_DWORD, 0x0, 0x18},
    {"pmax2a", FIELDTYPE_DATA_DWORD, 0x0, 0x1c},      {"pcode2b", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x20},
    {"pparam2b", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x24}, {"pmin2b", FIELDTYPE_DATA_DWORD, 0x0, 0x28},
    {"pmax2b", FIELDTYPE_DATA_DWORD, 0x0, 0x2c},      {"pcode3a", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x30},
    {"pparam3a", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x34}, {"pmin3a", FIELDTYPE_DATA_DWORD, 0x0, 0x38},
    {"pmax3a", FIELDTYPE_DATA_DWORD, 0x0, 0x3c},      {"pcode3b", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x40},
    {"pparam3b", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x44}, {"pmin3b", FIELDTYPE_DATA_DWORD, 0x0, 0x48},
    {"pmax3b", FIELDTYPE_DATA_DWORD, 0x0, 0x4c},      {"pcode4a", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x50},
    {"pparam4a", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x54}, {"pmin4a", FIELDTYPE_DATA_DWORD, 0x0, 0x58},
    {"pmax4a", FIELDTYPE_DATA_DWORD, 0x0, 0x5c},      {"pcode4b", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x60},
    {"pparam4b", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x64}, {"pmin4b", FIELDTYPE_DATA_DWORD, 0x0, 0x68},
    {"pmax4b", FIELDTYPE_DATA_DWORD, 0x0, 0x6c},      {"pcode5a", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x70},
    {"pparam5a", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x74}, {"pmin5a", FIELDTYPE_DATA_DWORD, 0x0, 0x78},
    {"pmax5a", FIELDTYPE_DATA_DWORD, 0x0, 0x7c},      {"pcode5b", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x80},
    {"pparam5b", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x84}, {"pmin5b", FIELDTYPE_DATA_DWORD, 0x0, 0x88},
    {"pmax5b", FIELDTYPE_DATA_DWORD, 0x0, 0x8c},      {"fcode1", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x90},
    {"fparam1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x94},  {"fmin1", FIELDTYPE_DATA_DWORD, 0x0, 0x98},
    {"fmax1", FIELDTYPE_DATA_DWORD, 0x0, 0x9c},       {"fcode2", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xa0},
    {"fparam2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa4},  {"fmin2", FIELDTYPE_DATA_DWORD, 0x0, 0xa8},
    {"fmax2", FIELDTYPE_DATA_DWORD, 0x0, 0xac},       {"fcode3", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xb0},
    {"fparam3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb4},  {"fmin3", FIELDTYPE_DATA_DWORD, 0x0, 0xb8},
    {"fmax3", FIELDTYPE_DATA_DWORD, 0x0, 0xbc},       {"fcode4", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xc0},
    {"fparam4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xc4},  {"fmin4", FIELDTYPE_DATA_DWORD, 0x0, 0xc8},
    {"fmax4", FIELDTYPE_DATA_DWORD, 0x0, 0xcc},       {"fcode5", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xd0},
    {"fparam5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xd4},  {"fmin5", FIELDTYPE_DATA_DWORD, 0x0, 0xd8},
    {"fmax5", FIELDTYPE_DATA_DWORD, 0x0, 0xdc},       {"fcode6", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xe0},
    {"fparam6", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xe4},  {"fmin6", FIELDTYPE_DATA_DWORD, 0x0, 0xe8},
    {"fmax6", FIELDTYPE_DATA_DWORD, 0x0, 0xec},       {"fcode7", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xf0},
    {"fparam7", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xf4},  {"fmin7", FIELDTYPE_DATA_DWORD, 0x0, 0xf8},
    {"fmax7", FIELDTYPE_DATA_DWORD, 0x0, 0xfc},       {"fcode8", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x100},
    {"fparam8", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x104}, {"fmin8", FIELDTYPE_DATA_DWORD, 0x0, 0x108},
    {"fmax8", FIELDTYPE_DATA_DWORD, 0x0, 0x10c},      {"end", FIELDTYPE_END, 0x0, 0x128},
};
static BinField itemtypesTable[] = {
    {"code", FIELDTYPE_ASCII_TO_CODE, 0x0, 0x0},      {"equiv1", FIELDTYPE_CODE_TO_WORD, 0x0, 0x4},      {"equiv2", FIELDTYPE_CODE_TO_WORD, 0x0, 0x6},
    {"repair", FIELDTYPE_DATA_BYTE, 0x0, 0x8},        {"body", FIELDTYPE_DATA_BYTE, 0x0, 0x9},           {"bodyloc1", FIELDTYPE_CODE_TO_BYTE, 0x0, 0xa},
    {"bodyloc2", FIELDTYPE_CODE_TO_BYTE, 0x0, 0xb},   {"shoots", FIELDTYPE_CODE_TO_WORD, 0x0, 0xc},      {"quiver", FIELDTYPE_CODE_TO_WORD, 0x0, 0xe},
    {"throwable", FIELDTYPE_DATA_BYTE, 0x0, 0x10},    {"reload", FIELDTYPE_DATA_BYTE, 0x0, 0x11},        {"reequip", FIELDTYPE_DATA_BYTE, 0x0, 0x12},
    {"autostack", FIELDTYPE_DATA_BYTE, 0x0, 0x13},    {"magic", FIELDTYPE_DATA_BYTE, 0x0, 0x14},         {"rare", FIELDTYPE_DATA_BYTE, 0x0, 0x15},
    {"normal", FIELDTYPE_DATA_BYTE, 0x0, 0x16},       {"charm", FIELDTYPE_DATA_BYTE, 0x0, 0x17},         {"gem", FIELDTYPE_DATA_BYTE, 0x0, 0x18},
    {"beltable", FIELDTYPE_DATA_BYTE, 0x0, 0x19},     {"maxsock1", FIELDTYPE_DATA_BYTE, 0x0, 0x1a},      {"maxsock25", FIELDTYPE_DATA_BYTE, 0x0, 0x1b},
    {"maxsock40", FIELDTYPE_DATA_BYTE, 0x0, 0x1c},    {"treasureclass", FIELDTYPE_DATA_BYTE, 0x0, 0x1d}, {"rarity", FIELDTYPE_DATA_BYTE, 0x0, 0x1e},
    {"staffmods", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x1f}, {"costformula", FIELDTYPE_DATA_BYTE, 0x0, 0x20},   {"class", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x21},
    {"storepage", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x22}, {"varinvgfx", FIELDTYPE_DATA_BYTE, 0x0, 0x23},     {"invgfx1", FIELDTYPE_DATA_ASCII, 0x1f, 0x24},
    {"invgfx2", FIELDTYPE_DATA_ASCII, 0x1f, 0x44},    {"invgfx3", FIELDTYPE_DATA_ASCII, 0x1f, 0x64},     {"invgfx4", FIELDTYPE_DATA_ASCII, 0x1f, 0x84},
    {"invgfx5", FIELDTYPE_DATA_ASCII, 0x1f, 0xa4},    {"invgfx6", FIELDTYPE_DATA_ASCII, 0x1f, 0xc4},     {"end", FIELDTYPE_END, 0x0, 0xe4},
};
static BinField runesTable[] = {
    {"name", FIELDTYPE_DATA_ASCII, 0x3f, 0x0},        {"rune name", FIELDTYPE_DATA_ASCII, 0x3f, 0x40},   {"complete", FIELDTYPE_DATA_BYTE, 0x0, 0x80},
    {"server", FIELDTYPE_DATA_BYTE, 0x0, 0x81},       {"itype1", FIELDTYPE_CODE_TO_WORD, 0x0, 0x86},     {"itype2", FIELDTYPE_CODE_TO_WORD, 0x0, 0x88},
    {"itype3", FIELDTYPE_CODE_TO_WORD, 0x0, 0x8a},    {"itype4", FIELDTYPE_CODE_TO_WORD, 0x0, 0x8c},     {"itype5", FIELDTYPE_CODE_TO_WORD, 0x0, 0x8e},
    {"itype6", FIELDTYPE_CODE_TO_WORD, 0x0, 0x90},    {"etype1", FIELDTYPE_CODE_TO_WORD, 0x0, 0x92},     {"etype2", FIELDTYPE_CODE_TO_WORD, 0x0, 0x94},
    {"etype3", FIELDTYPE_CODE_TO_WORD, 0x0, 0x96},    {"rune1", FIELDTYPE_UNKNOWN_11, 0x0, 0x98},        {"rune2", FIELDTYPE_UNKNOWN_11, 0x0, 0x9c},
    {"rune3", FIELDTYPE_UNKNOWN_11, 0x0, 0xa0},       {"rune4", FIELDTYPE_UNKNOWN_11, 0x0, 0xa4},        {"rune5", FIELDTYPE_UNKNOWN_11, 0x0, 0xa8},
    {"rune6", FIELDTYPE_UNKNOWN_11, 0x0, 0xac},       {"t1code1", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xb0},   {"t1param1", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb4},
    {"t1min1", FIELDTYPE_DATA_DWORD_2, 0x0, 0xb8},    {"t1max1", FIELDTYPE_DATA_DWORD_2, 0x0, 0xbc},     {"t1code2", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xc0},
    {"t1param2", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xc4}, {"t1min2", FIELDTYPE_DATA_DWORD_2, 0x0, 0xc8},     {"t1max2", FIELDTYPE_DATA_DWORD_2, 0x0, 0xcc},
    {"t1code3", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xd0},  {"t1param3", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xd4},  {"t1min3", FIELDTYPE_DATA_DWORD_2, 0x0, 0xd8},
    {"t1max3", FIELDTYPE_DATA_DWORD_2, 0x0, 0xdc},    {"t1code4", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xe0},   {"t1param4", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xe4},
    {"t1min4", FIELDTYPE_DATA_DWORD_2, 0x0, 0xe8},    {"t1max4", FIELDTYPE_DATA_DWORD_2, 0x0, 0xec},     {"t1code5", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xf0},
    {"t1param5", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xf4}, {"t1min5", FIELDTYPE_DATA_DWORD_2, 0x0, 0xf8},     {"t1max5", FIELDTYPE_DATA_DWORD_2, 0x0, 0xfc},
    {"t1code6", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x100}, {"t1param6", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x104}, {"t1min6", FIELDTYPE_DATA_DWORD_2, 0x0, 0x108},
    {"t1max6", FIELDTYPE_DATA_DWORD_2, 0x0, 0x10c},   {"t1code7", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x110},  {"t1param7", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x114},
    {"t1min7", FIELDTYPE_DATA_DWORD_2, 0x0, 0x118},   {"t1max7", FIELDTYPE_DATA_DWORD_2, 0x0, 0x11c},    {"end", FIELDTYPE_END, 0x0, 0x120},
};
static BinField cubemainTable[] = {
    {"enabled", FIELDTYPE_DATA_BYTE, 0x0, 0x0},
    {"ladder", FIELDTYPE_DATA_BYTE, 0x0, 0x1},
    {"min diff", FIELDTYPE_DATA_BYTE, 0x0, 0x2},
    {"class", FIELDTYPE_CODE_TO_BYTE, 0x0, 0x3},
    {"op", FIELDTYPE_DATA_BYTE, 0x0, 0x4},
    {"param", FIELDTYPE_DATA_DWORD, 0x0, 0x8},
    {"value", FIELDTYPE_DATA_DWORD, 0x0, 0xc},
    {"numinputs", FIELDTYPE_DATA_BYTE, 0x0, 0x10},
    {"version", FIELDTYPE_DATA_WORD, 0x0, 0x12},
    {"input item 1 item code flag", FIELDTYPE_DATA_BIT, 0x0, 0x14},
    {"input item 1 item class flag", FIELDTYPE_DATA_BIT, 0x1, 0x14},
    {"input item 1 any flag", FIELDTYPE_DATA_BIT, 0x2, 0x14},
    {"input item 1 socket flag", FIELDTYPE_DATA_BIT, 0x3, 0x14},
    {"input item 1 no ethereal flag", FIELDTYPE_DATA_BIT, 0x4, 0x14},
    {"input item 1 repair flag", FIELDTYPE_DATA_BIT, 0x5, 0x14},
    {"input item 1 unique item name flag", FIELDTYPE_DATA_BIT, 0x6, 0x14},
    {"input item 1 upg flag", FIELDTYPE_DATA_BIT, 0x7, 0x14},
    {"input 1 item type", FIELDTYPE_DATA_BYTE, 0x0, 0x15},
    {"input 1 item", FIELDTYPE_DATA_BYTE, 0x0, 0x16},
    {"input 1 item id", FIELDTYPE_DATA_BYTE, 0x0, 0x18},
    {"input 1 quality", FIELDTYPE_DATA_BYTE, 0x0, 0x1a},
    {"input 1 quantity", FIELDTYPE_DATA_BYTE, 0x0, 0x1b},
    {"input item 2 item code flag", FIELDTYPE_DATA_BIT, 0x0, 0x1c},
    {"input item 2 item class flag", FIELDTYPE_DATA_BIT, 0x1, 0x1c},
    {"input item 2 any flag", FIELDTYPE_DATA_BIT, 0x2, 0x1c},
    {"input item 2 socket flag", FIELDTYPE_DATA_BIT, 0x3, 0x1c},
    {"input item 2 no ethereal flag", FIELDTYPE_DATA_BIT, 0x4, 0x1c},
    {"input item 2 repair flag", FIELDTYPE_DATA_BIT, 0x5, 0x1c},
    {"input item 2 unique item name flag", FIELDTYPE_DATA_BIT, 0x6, 0x1c},
    {"input item 2 upg flag", FIELDTYPE_DATA_BIT, 0x7, 0x1c},
    {"input 2 item type", FIELDTYPE_DATA_BYTE, 0x0, 0x1d},
    {"input 2 item", FIELDTYPE_DATA_BYTE, 0x0, 0x1e},
    {"input 2 item id", FIELDTYPE_DATA_BYTE, 0x0, 0x20},
    {"input 2 quality", FIELDTYPE_DATA_BYTE, 0x0, 0x22},
    {"input 2 quantity", FIELDTYPE_DATA_BYTE, 0x0, 0x23},
    {"input item 3 item code flag", FIELDTYPE_DATA_BIT, 0x0, 0x24},
    {"input item 3 item class flag", FIELDTYPE_DATA_BIT, 0x1, 0x24},
    {"input item 3 any flag", FIELDTYPE_DATA_BIT, 0x2, 0x24},
    {"input item 3 socket flag", FIELDTYPE_DATA_BIT, 0x3, 0x24},
    {"input item 3 no ethereal flag", FIELDTYPE_DATA_BIT, 0x4, 0x24},
    {"input item 3 repair flag", FIELDTYPE_DATA_BIT, 0x5, 0x24},
    {"input item 3 unique item name flag", FIELDTYPE_DATA_BIT, 0x6, 0x24},
    {"input item 3 upg flag", FIELDTYPE_DATA_BIT, 0x7, 0x24},
    {"input 3 item type", FIELDTYPE_DATA_BYTE, 0x0, 0x25},
    {"input 3 item", FIELDTYPE_DATA_BYTE, 0x0, 0x26},
    {"input 3 item id", FIELDTYPE_DATA_BYTE, 0x0, 0x28},
    {"input 3 quality", FIELDTYPE_DATA_BYTE, 0x0, 0x2a},
    {"input 3 quantity", FIELDTYPE_DATA_BYTE, 0x0, 0x2b},
    {"input item 4 item code flag", FIELDTYPE_DATA_BIT, 0x0, 0x2c},
    {"input item 4 item class flag", FIELDTYPE_DATA_BIT, 0x1, 0x2c},
    {"input item 4 any flag", FIELDTYPE_DATA_BIT, 0x2, 0x2c},
    {"input item 4 socket flag", FIELDTYPE_DATA_BIT, 0x3, 0x2c},
    {"input item 4 no ethereal flag", FIELDTYPE_DATA_BIT, 0x4, 0x2c},
    {"input item 4 repair flag", FIELDTYPE_DATA_BIT, 0x5, 0x2c},
    {"input item 4 unique item name flag", FIELDTYPE_DATA_BIT, 0x6, 0x2c},
    {"input item 4 upg flag", FIELDTYPE_DATA_BIT, 0x7, 0x2c},
    {"input 4 item type", FIELDTYPE_DATA_BYTE, 0x0, 0x2d},
    {"input 4 item", FIELDTYPE_DATA_BYTE, 0x0, 0x2e},
    {"input 4 item id", FIELDTYPE_DATA_BYTE, 0x0, 0x30},
    {"input 4 quality", FIELDTYPE_DATA_BYTE, 0x0, 0x32},
    {"input 4 quantity", FIELDTYPE_DATA_BYTE, 0x0, 0x33},
    {"input item 5 item code flag", FIELDTYPE_DATA_BIT, 0x0, 0x34},
    {"input item 5 item class flag", FIELDTYPE_DATA_BIT, 0x1, 0x34},
    {"input item 5 any flag", FIELDTYPE_DATA_BIT, 0x2, 0x34},
    {"input item 5 socket flag", FIELDTYPE_DATA_BIT, 0x3, 0x34},
    {"input item 5 no ethereal flag", FIELDTYPE_DATA_BIT, 0x4, 0x34},
    {"input item 5 repair flag", FIELDTYPE_DATA_BIT, 0x5, 0x34},
    {"input item 5 unique item name flag", FIELDTYPE_DATA_BIT, 0x6, 0x34},
    {"input item 5 upg flag", FIELDTYPE_DATA_BIT, 0x7, 0x34},
    {"input 5 item type", FIELDTYPE_DATA_BYTE, 0x0, 0x35},
    {"input 5 item", FIELDTYPE_DATA_BYTE, 0x0, 0x36},
    {"input 5 item id", FIELDTYPE_DATA_BYTE, 0x0, 0x38},
    {"input 5 quality", FIELDTYPE_DATA_BYTE, 0x0, 0x3a},
    {"input 5 quantity", FIELDTYPE_DATA_BYTE, 0x0, 0x3b},
    {"input item 6 item code flag", FIELDTYPE_DATA_BIT, 0x0, 0x3c},
    {"input item 6 item class flag", FIELDTYPE_DATA_BIT, 0x1, 0x3c},
    {"input item 6 any flag", FIELDTYPE_DATA_BIT, 0x2, 0x3c},
    {"input item 6 socket flag", FIELDTYPE_DATA_BIT, 0x3, 0x3c},
    {"input item 6 no ethereal flag", FIELDTYPE_DATA_BIT, 0x4, 0x3c},
    {"input item 6 repair flag", FIELDTYPE_DATA_BIT, 0x5, 0x3c},
    {"input item 6 unique item name flag", FIELDTYPE_DATA_BIT, 0x6, 0x3c},
    {"input item 6 upg flag", FIELDTYPE_DATA_BIT, 0x7, 0x3c},
    {"input 6 item type", FIELDTYPE_DATA_BYTE, 0x0, 0x3d},
    {"input 6 item", FIELDTYPE_DATA_BYTE, 0x0, 0x3e},
    {"input 6 item id", FIELDTYPE_DATA_BYTE, 0x0, 0x40},
    {"input 6 quality", FIELDTYPE_DATA_BYTE, 0x0, 0x42},
    {"input 6 quantity", FIELDTYPE_DATA_BYTE, 0x0, 0x43},
    {"input item 7 item code flag", FIELDTYPE_DATA_BIT, 0x0, 0x44},
    {"input item 7 item class flag", FIELDTYPE_DATA_BIT, 0x1, 0x44},
    {"input item 7 any flag", FIELDTYPE_DATA_BIT, 0x2, 0x44},
    {"input item 7 socket flag", FIELDTYPE_DATA_BIT, 0x3, 0x44},
    {"input item 7 no ethereal flag", FIELDTYPE_DATA_BIT, 0x4, 0x44},
    {"input item 7 repair flag", FIELDTYPE_DATA_BIT, 0x5, 0x44},
    {"input item 7 unique item name flag", FIELDTYPE_DATA_BIT, 0x6, 0x44},
    {"input item 7 upg flag", FIELDTYPE_DATA_BIT, 0x7, 0x44},
    {"input 7 item type", FIELDTYPE_DATA_BYTE, 0x0, 0x45},
    {"input 7 item", FIELDTYPE_DATA_BYTE, 0x0, 0x46},
    {"input 7 item id", FIELDTYPE_DATA_BYTE, 0x0, 0x48},
    {"input 7 quality", FIELDTYPE_DATA_BYTE, 0x0, 0x4a},
    {"input 7 quantity", FIELDTYPE_DATA_BYTE, 0x0, 0x4b},
    {"output item flags", FIELDTYPE_DATA_BYTE, 0x0, 0x4c},
    {"output item type", FIELDTYPE_DATA_BYTE, 0x0, 0x4d},
    {"output item", FIELDTYPE_DATA_BYTE, 0x0, 0x4e},
    {"output item id", FIELDTYPE_DATA_BYTE, 0x0, 0x50},
    {"output item quality", FIELDTYPE_DATA_BYTE, 0x0, 0x52},
    {"output item quantity", FIELDTYPE_DATA_BYTE, 0x0, 0x53},
    {"output type", FIELDTYPE_DATA_BYTE, 0x0, 0x54},
    {"lvl", FIELDTYPE_DATA_BYTE, 0x0, 0x55},
    {"plvl", FIELDTYPE_DATA_BYTE, 0x0, 0x56},
    {"ilvl", FIELDTYPE_DATA_BYTE, 0x0, 0x57},
    {"output item prefix id", FIELDTYPE_DATA_BYTE, 0x0, 0x58},
    {"output item unknown", FIELDTYPE_DATA_BYTE, 0x0, 0x5a},
    {"output item suffix id", FIELDTYPE_DATA_BYTE, 0x0, 0x5e},
    {"unknown field", FIELDTYPE_DATA_BYTE, 0x0, 0x60},
    {"mod 1", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x64},
    {"mod 1 param", FIELDTYPE_DATA_WORD, 0x0, 0x68},
    {"mod 1 min", FIELDTYPE_DATA_WORD, 0x0, 0x6a},
    {"mod 1 max", FIELDTYPE_DATA_WORD, 0x0, 0x6c},
    {"mod 1 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x6e},
    {"mod 2", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x70},
    {"mod 2 param", FIELDTYPE_DATA_WORD, 0x0, 0x74},
    {"mod 2 min", FIELDTYPE_DATA_WORD, 0x0, 0x76},
    {"mod 2 max", FIELDTYPE_DATA_WORD, 0x0, 0x78},
    {"mod 2 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x7a},
    {"mod 3", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x7c},
    {"mod 3 param", FIELDTYPE_DATA_WORD, 0x0, 0x80},
    {"mod 3 min", FIELDTYPE_DATA_WORD, 0x0, 0x82},
    {"mod 3 max", FIELDTYPE_DATA_WORD, 0x0, 0x84},
    {"mod 3 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x86},
    {"mod 4", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x88},
    {"mod 4 param", FIELDTYPE_DATA_WORD, 0x0, 0x8c},
    {"mod 4 min", FIELDTYPE_DATA_WORD, 0x0, 0x8e},
    {"mod 4 max", FIELDTYPE_DATA_WORD, 0x0, 0x90},
    {"mod 4 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x92},
    {"mod 5", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x94},
    {"mod 5 param", FIELDTYPE_DATA_WORD, 0x0, 0x98},
    {"mod 5 min", FIELDTYPE_DATA_WORD, 0x0, 0x9a},
    {"mod 5 max", FIELDTYPE_DATA_WORD, 0x0, 0x9c},
    {"mod 5 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x9e},
    {"b lvl", FIELDTYPE_DATA_BYTE, 0x0, 0xa9},
    {"b plvl", FIELDTYPE_DATA_BYTE, 0x0, 0xaa},
    {"b ilvl", FIELDTYPE_DATA_BYTE, 0x0, 0xab},
    {"b mod 1", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xb8},
    {"b mod 1 param", FIELDTYPE_DATA_WORD, 0x0, 0xbc},
    {"b mod 1 min", FIELDTYPE_DATA_WORD, 0x0, 0xbe},
    {"b mod 1 max", FIELDTYPE_DATA_WORD, 0x0, 0xc0},
    {"b mod 1 chance", FIELDTYPE_DATA_BYTE, 0x0, 0xc2},
    {"b mod 2", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xc4},
    {"b mod 2 param", FIELDTYPE_DATA_WORD, 0x0, 0xc8},
    {"b mod 2 min", FIELDTYPE_DATA_WORD, 0x0, 0xca},
    {"b mod 2 max", FIELDTYPE_DATA_WORD, 0x0, 0xcc},
    {"b mod 2 chance", FIELDTYPE_DATA_BYTE, 0x0, 0xce},
    {"b mod 3", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xd0},
    {"b mod 3 param", FIELDTYPE_DATA_WORD, 0x0, 0xd4},
    {"b mod 3 min", FIELDTYPE_DATA_WORD, 0x0, 0xd6},
    {"b mod 3 max", FIELDTYPE_DATA_WORD, 0x0, 0xd8},
    {"b mod 3 chance", FIELDTYPE_DATA_BYTE, 0x0, 0xda},
    {"b mod 4", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xdc},
    {"b mod 4 param", FIELDTYPE_DATA_WORD, 0x0, 0xe0},
    {"b mod 4 min", FIELDTYPE_DATA_WORD, 0x0, 0xe2},
    {"b mod 4 max", FIELDTYPE_DATA_WORD, 0x0, 0xe4},
    {"b mod 4 chance", FIELDTYPE_DATA_BYTE, 0x0, 0xe6},
    {"b mod 5", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xe8},
    {"b mod 5 param", FIELDTYPE_DATA_WORD, 0x0, 0xec},
    {"b mod 5 min", FIELDTYPE_DATA_WORD, 0x0, 0xee},
    {"b mod 5 max", FIELDTYPE_DATA_WORD, 0x0, 0xf0},
    {"b mod 5 chance", FIELDTYPE_DATA_BYTE, 0x0, 0xf2},
    {"c lvl", FIELDTYPE_DATA_BYTE, 0x0, 0xfd},
    {"c plvl", FIELDTYPE_DATA_BYTE, 0x0, 0xfe},
    {"c ilvl", FIELDTYPE_DATA_BYTE, 0x0, 0xff},
    {"c mod 1", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x10c},
    {"c mod 1 param", FIELDTYPE_DATA_WORD, 0x0, 0x110},
    {"c mod 1 min", FIELDTYPE_DATA_WORD, 0x0, 0x112},
    {"c mod 1 max", FIELDTYPE_DATA_WORD, 0x0, 0x114},
    {"c mod 1 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x116},
    {"c mod 2", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x118},
    {"c mod 2 param", FIELDTYPE_DATA_WORD, 0x0, 0x11c},
    {"c mod 2 min", FIELDTYPE_DATA_WORD, 0x0, 0x11e},
    {"c mod 2 max", FIELDTYPE_DATA_WORD, 0x0, 0x120},
    {"c mod 2 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x122},
    {"c mod 3", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x124},
    {"c mod 3 param", FIELDTYPE_DATA_WORD, 0x0, 0x128},
    {"c mod 3 min", FIELDTYPE_DATA_WORD, 0x0, 0x12a},
    {"c mod 3 max", FIELDTYPE_DATA_WORD, 0x0, 0x12c},
    {"c mod 3 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x12e},
    {"c mod 4", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x130},
    {"c mod 4 param", FIELDTYPE_DATA_WORD, 0x0, 0x134},
    {"c mod 4 min", FIELDTYPE_DATA_WORD, 0x0, 0x136},
    {"c mod 4 max", FIELDTYPE_DATA_WORD, 0x0, 0x138},
    {"c mod 4 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x13a},
    {"c mod 5", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x13c},
    {"c mod 5 param", FIELDTYPE_DATA_WORD, 0x0, 0x140},
    {"c mod 5 min", FIELDTYPE_DATA_WORD, 0x0, 0x142},
    {"c mod 5 max", FIELDTYPE_DATA_WORD, 0x0, 0x144},
    {"c mod 5 chance", FIELDTYPE_DATA_BYTE, 0x0, 0x146},
    {"end", FIELDTYPE_END, 0x0, 0x148},
};
static BinField gemsTable[] = {
    {"name", FIELDTYPE_DATA_ASCII, 0x1f, 0x0},
    {"letter", FIELDTYPE_DATA_ASCII, 0x5, 0x20},
    {"code", FIELDTYPE_UNKNOWN_11, 0x0, 0x28},
    {"nummods", FIELDTYPE_DATA_BYTE, 0x0, 0x2e},
    {"transform", FIELDTYPE_DATA_BYTE, 0x0, 0x2f},
    {"weaponmod1code", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x30},
    {"weaponmod1param", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x34},
    {"weaponmod1min", FIELDTYPE_DATA_DWORD_2, 0x0, 0x38},
    {"weaponmod1max", FIELDTYPE_DATA_DWORD_2, 0x0, 0x3c},
    {"weaponmod2code", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x40},
    {"weaponmod2param", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x44},
    {"weaponmod2min", FIELDTYPE_DATA_DWORD_2, 0x0, 0x48},
    {"weaponmod2max", FIELDTYPE_DATA_DWORD_2, 0x0, 0x4c},
    {"weaponmod3code", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x50},
    {"weaponmod3param", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x54},
    {"weaponmod3min", FIELDTYPE_DATA_DWORD_2, 0x0, 0x58},
    {"weaponmod3max", FIELDTYPE_DATA_DWORD_2, 0x0, 0x5c},
    {"helmmod1code", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x60},
    {"helmmod1param", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x64},
    {"helmmod1min", FIELDTYPE_DATA_DWORD_2, 0x0, 0x68},
    {"helmmod1max", FIELDTYPE_DATA_DWORD_2, 0x0, 0x6c},
    {"helmmod2code", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x70},
    {"helmmod2param", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x74},
    {"helmmod2min", FIELDTYPE_DATA_DWORD_2, 0x0, 0x78},
    {"helmmod2max", FIELDTYPE_DATA_DWORD_2, 0x0, 0x7c},
    {"helmmod3code", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x80},
    {"helmmod3param", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x84},
    {"helmmod3min", FIELDTYPE_DATA_DWORD_2, 0x0, 0x88},
    {"helmmod3max", FIELDTYPE_DATA_DWORD_2, 0x0, 0x8c},
    {"shieldmod1code", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x90},
    {"shieldmod1param", FIELDTYPE_CALC_TO_DWORD, 0x0, 0x94},
    {"shieldmod1min", FIELDTYPE_DATA_DWORD_2, 0x0, 0x98},
    {"shieldmod1max", FIELDTYPE_DATA_DWORD_2, 0x0, 0x9c},
    {"shieldmod2code", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xa0},
    {"shieldmod2param", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xa4},
    {"shieldmod2min", FIELDTYPE_DATA_DWORD_2, 0x0, 0xa8},
    {"shieldmod2max", FIELDTYPE_DATA_DWORD_2, 0x0, 0xac},
    {"shieldmod3code", FIELDTYPE_NAME_TO_DWORD, 0x0, 0xb0},
    {"shieldmod3param", FIELDTYPE_CALC_TO_DWORD, 0x0, 0xb4},
    {"shieldmod3min", FIELDTYPE_DATA_DWORD_2, 0x0, 0xb8},
    {"shieldmod3max", FIELDTYPE_DATA_DWORD_2, 0x0, 0xbc},
    {"end", FIELDTYPE_END, 0x0, 0xc0},
};
static BinField experienceTable[] = {
    {"Amazon", FIELDTYPE_DATA_DWORD, 0x0, 0x0},      {"Sorceress", FIELDTYPE_DATA_DWORD, 0x0, 0x4},
    {"Necromancer", FIELDTYPE_DATA_DWORD, 0x0, 0x8}, {"Paladin", FIELDTYPE_DATA_DWORD, 0x0, 0xc},
    {"Barbarian", FIELDTYPE_DATA_DWORD, 0x0, 0x10},  {"Druid", FIELDTYPE_DATA_DWORD, 0x0, 0x14},
    {"Assassin", FIELDTYPE_DATA_DWORD, 0x0, 0x18},   {"end", FIELDTYPE_END, 0x0, 0x20},
};
static BinField pettypeTable[] = {
    {"pet type", FIELDTYPE_NAME_TO_INDEX_2, 0x0, 0x0}, {"warp", FIELDTYPE_DATA_BIT, 0x0, 0x4},       {"range", FIELDTYPE_DATA_BIT, 0x1, 0x4},
    {"partysend", FIELDTYPE_DATA_BIT, 0x2, 0x4},       {"unsummon", FIELDTYPE_DATA_BIT, 0x3, 0x4},   {"automap", FIELDTYPE_DATA_BIT, 0x4, 0x4},
    {"drawhp", FIELDTYPE_DATA_BIT, 0x5, 0x4},          {"group", FIELDTYPE_DATA_WORD, 0x0, 0x8},     {"basemax", FIELDTYPE_DATA_WORD, 0x0, 0xa},
    {"name", FIELDTYPE_KEY_TO_WORD, 0x0, 0xc},         {"icontype", FIELDTYPE_DATA_BYTE, 0x0, 0xe},  {"baseicon", FIELDTYPE_DATA_ASCII, 0x20, 0xf},
    {"micon1", FIELDTYPE_DATA_ASCII, 0x20, 0x2f},      {"micon2", FIELDTYPE_DATA_ASCII, 0x20, 0x4f}, {"micon3", FIELDTYPE_DATA_ASCII, 0x20, 0x6f},
    {"micon4", FIELDTYPE_DATA_ASCII, 0x20, 0x8f},      {"mclass1", FIELDTYPE_DATA_WORD, 0x0, 0xb2},  {"mclass2", FIELDTYPE_DATA_WORD, 0x0, 0xb4},
    {"mclass3", FIELDTYPE_DATA_WORD, 0x0, 0xb6},       {"mclass4", FIELDTYPE_DATA_WORD, 0x0, 0xb8},  {"end", FIELDTYPE_END, 0x0, 0xe0},
};
static BinField superuniquesTable[] = {
    {"Superunique", FIELDTYPE_NAME_TO_INDEX, 0x0, 0x0}, {"Name", FIELDTYPE_KEY_TO_WORD, 0x0, 0x2},        {"Class", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x4},
    {"hcIdx", FIELDTYPE_DATA_DWORD, 0x0, 0x8},          {"Mod1", FIELDTYPE_DATA_DWORD, 0x0, 0xc},         {"Mod2", FIELDTYPE_DATA_DWORD, 0x0, 0x10},
    {"Mod3", FIELDTYPE_DATA_DWORD, 0x0, 0x14},          {"MonSound", FIELDTYPE_NAME_TO_DWORD, 0x0, 0x18}, {"MinGrp", FIELDTYPE_DATA_DWORD, 0x0, 0x1c},
    {"MaxGrp", FIELDTYPE_DATA_DWORD, 0x0, 0x20},        {"AutoPos", FIELDTYPE_DATA_BYTE, 0x0, 0x24},      {"EClass", FIELDTYPE_DATA_BYTE, 0x0, 0x25},
    {"Stacks", FIELDTYPE_DATA_BYTE, 0x0, 0x26},         {"Replaceable", FIELDTYPE_DATA_BYTE, 0x0, 0x27},  {"Utrans", FIELDTYPE_DATA_BYTE, 0x0, 0x28},
    {"Utrans(N)", FIELDTYPE_DATA_BYTE, 0x0, 0x29},      {"Utrans(H)", FIELDTYPE_DATA_BYTE, 0x0, 0x2a},    {"TC", FIELDTYPE_NAME_TO_WORD, 0x0, 0x2c},
    {"TC(N)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x2e},       {"TC(H)", FIELDTYPE_NAME_TO_WORD, 0x0, 0x30},     {"end", FIELDTYPE_END, 0x0, 0x34},
};
